[Openstreetmap-dev] Streets in GPX

nick at hogweed.org nick at hogweed.org
Thu Sep 22 11:33:35 BST 2005


From what I gather (and I may be wrong) the plan to represent whole streets is 
to have one <trk> tag for the whole street, then each segment (of two nodes) 
as its own <trkseg> tag.

However, is this the most efficient way in terms of file size? e.g.

<trk>
<id>505021</id>
<name>Lodge Road</name>
<extensions>
... key value stuff
</extensions>
<trkseg>
<trkpt lat="lat1" lon="lon1"/>
<trkpt lat="lat2" lon="lon2"/>
</trkseg>

<trkseg>
<trkpt lat="lat2" lon="lon2"/>
<trkpt lat="lat3" lon="lon3"/>
</trkseg>

<trkseg>
<trkpt lat="lat3" lon="lon3"/>

etc. 

i.e. points belonging to two segments are repeated.

Would it be better to do

<trk>
...
<trkseg>
<trkpt lat="lat1" lon="lon1"/>
<trkpt lat="lat2" lon="lon2"/>
<trkpt lat="lat3" lon="lon3"/>
... etc ...

which for long roads with say 1000 points would significantly cut down file 
size? That's the way I export data in freemap at the moment. 

Nick




More information about the dev mailing list