[Openstreetmap] Extending GPX to include track type information?

Nick Whitelegg nick at hogweed.org
Mon Mar 21 20:26:20 GMT 2005


On Sunday 20 Mar 2005 14:40, you wrote:
> * On 20-Mar-2005 at  5:45AM PST, Nick Whitelegg said:
> > 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 think that's reasonable. I would use a textual definition, but
> other than that, I think the extension you describe could be easily
> parsed and joined to the tracks by a GPX-capable SAX parser. Why not
> go for it, and publish a spec if you do. (But think about those
> textual definitions, eh?) ;-)
>
> SDE

Combining yours and Lars's responses, I think the best thing to do is to have 
a separate <trkseg> for each segment, then have the table just store segment 
types in the same order as the <trkseg>s (no need for start and end tags in 
that case). e.g.

<segdefs>
<seg>
<foot>yes</foot>
<horse>yes</horse>
</seg> <!-- segment 1-->

... etc.... (like the readable form of the tags? ;-) )

Re Lars's point.... I'm a bit worried about each path being a separate <trk>. 
For example, if you were editing a track, and wanted to divide it up into 
segments of different types, if each newly-created segment was separated out 
into a separate <trk> you would lose the information on the parent track of 
each segment, the original GPS-surveyed track. This could be a problem if you 
made a mistake and you wished to delete a segment. I do feel that there needs 
to be a way to associate track *segments* with types.

Nick




More information about the talk mailing list