[Openstreetmap] Extending GPX to include track type information?

Lars Luthman larsl at users.sourceforge.net
Sun Mar 20 13:54:37 GMT 2005


On Sun, 2005-03-20 at 13:47 +0000, Nick Whitelegg wrote:
> The problem is GPX does not allow specification of track segment types. I'm 
> getting round this by using GPX's ability to add extensions within the 
> <extensions> tag, and adding a table of segment types, and start and end 
> trackpoints, within the extensions  tag i.e.
> 
> <extensions>
> 
> <!-- This segment starts at track point 3, ends at track point 7, and has type 
> 1 (my current type definition for footpath though could be changed to a more 
> textual form as per the other thread... -->
> 
> <segdef>
> <start>3</start>
> <end>7</end>
> <type>1</type>
> </segdef>
> 
> <segdef>
> ....
> etc
> 
> This works (and could be easily extended to multiple tracks in the same GPX 
> file) but is maybe a tad clunky. I want to keep GPX (rather than a more 
> complex format) as it's simple and lightweight but just wondering what 
> others' approaches would be?

Do you really need the different types to be in the same track? If you
split them into multiple tracks you already have a <type> element for
tracks in the GPX specification.

Also, the <start> and <end> tags are a bit confusing - why are they
needed? Are your track segments different from the trksegs defined in
GPX?

-- 
Lars Luthman
PGP key:     http://www.d.kth.se/~d00-llu/pgp_key.php
Fingerprint: FCA7 C790 19B9 322D EB7A  E1B3 4371 4650 04C7 7E2E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20050320/55df7a87/attachment.pgp>


More information about the talk mailing list