[Openstreetmap-dev] More on GPX schema
nick at hogweed.org
nick at hogweed.org
Wed Sep 21 16:16:25 BST 2005
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.
<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.
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.
Nick
More information about the dev
mailing list