[Openstreetmap] Extending GPX to include track type information?
Nick Whitelegg
nick at hogweed.org
Sun Mar 20 13:47:11 GMT 2005
Hello,
Relating to this track type thing again, and with particular relevance for
countryside walking maps.... one thing I'm coming up with in track-editing
GPS tracks is that GPX does not allow you to specify the type of track
segments. This is of interest to me in the application I'm writing as I want
the user to be able to load in GPX data from a GPS, then divide the track
into segments of different types (footpath, bridleway, cycle path etc) which
can either then be sent to OpenStreetMap, or (relating to this post) saved to
GPX for later reloading.
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?
Thanks,
Nick
More information about the talk
mailing list