[Openstreetmap-dev] More on GPX schema

SteveC steve at asklater.com
Wed Sep 21 17:55:31 BST 2005

* @ 21/09/05 03:16:25 PM nick at hogweed.org wrote:
> Been looking at the official GPX schema, in combination with what 
> OpenStreetMap does so far with GPX files. Given OpenStreetMap treats each 
> track segment as a separate <trk> element in GPX, there appears to be no need 
> for GPX extensions.
> Currently, the OpenStreetMap GPX format places the track ID in the <name> tag. 
> However, the GPX schema indicates a <number> tag for the <trk> element. 
> Therefore, would it be a good idea to place the ID in the <number> tag, and 
> the name of the segment (e.g. Lodge Road) in the <name> tag? e.g.

Yes, changing name to number. 'name' keyval as name cml tag I'm not so
sure about.

> <trk>
> <number>50521</number>
> <name>Lodge Road</name>
> ......
> The GPX schema also includes a <desc> (user description) tag. If we're using 
> Steve's suggestion for representing keys and values as a semicolon separated 


> list, they could go in the <desc> tag. The name should perhaps be separate 
> from the key/value list, as a name is a pretty fundamental feature of every 
> road.

Hrm. Good point.

> i.e.
> <trk>
> <number>50521</number>
> <name>Lodge Road</name>
> <desc>foot=yes; horse=yes; car=yes; class=secondary</desc>
> <trkseg>
> .....
> Secondly (I think this is happening anyway...) I believe it's important that 
> trksegs contain multiple nodes (points), rather than just two; for instance 
> in the above example, if Lodge Road contained 10 nodes and 9 segments of two 
> nodes (rather than 10 nodes and one segment of 10 nodes), each of the 9 
> segments would need the meta-info (name, keys and values) attached to it, 
> wasting space in the GPX file and slowing down upload and download.

This is what streets do, and more flexibly. A street is an ordered set
of segments. Or will be, anyway.

have fun,

SteveC steve at asklater.com http://www.asklater.com/steve/

More information about the dev mailing list