View Single Post
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#7
Originally Posted by bmentink
An update.

If you save as a "track", not a "route" Maemo Mapper loads it fine as a "route" ... go figure ..
Sorry for this confusion, which is caused by a slightly different definition of these two terms as used by GPX and by Maemo Mapper.

Maemo Mapper defines a route as a set of latitude/longitude points along which you would like to travel (in the future). A track is a set of latitude/longitude pairs along which you have actually traveled. The data points are very similar (latitude/longitude points), the only difference is the intended use (and thus how they are drawn on the map). Since the underlying data is the same, Maemo Mapper stores both files in the same GPX format (using GPX trk elements). This is why the files are actually interchangeable (for example, you can save your current track and load it later as a route).

GPX defines a track in the same way as Maemo Mapper defines it, which is why Maemo Mapper uses the trk element for both tracks and routes. A GPX route, however, is defined as a set of waypoints only (not the points in between the waypoints). Plotting this kind of route in Maemo Mapper would result in a series of green dots connected by straight lines, instead of the series of green dots connected by smooth, curved lines. Hence my decision to use trk elements instead of rte elements.

Now, from what I understand, the intended use of GPX's separate trk and rte elements is to provide both rte and trk tags, where the trk data represents the curved line and the rte data represents the waypoints. I might "upgrade" Maemo Mapper to write and/or understand these semantics, but it's a little more cumbersome to work with in code, so I haven't done it yet. It wouldn't fix the ugliness of GPX data that had rte data without trk data, but it would at least allow the data to be drawn.
 

The Following User Says Thank You to gnuite For This Useful Post: