[josm-dev] GPX markers

David Earl david at frankieandshadow.com
Wed Feb 13 23:18:30 GMT 2008


Would anyone object to me doing the following:

(1) when reading a GPX file, if a 'trkpt' has a 'name' or 'desc' 
element, duplicate the point as a WayPoint in the marker layer so it 
shows up.

(2) if a marker does not have a 'name' attribute but does have a 'desc' 
attribute, display the 'desc' where the 'name' would otherwise be displayed.

I could put options in to control both of these, but I suspect they 
won't make any difference in 99% of cases. So I'll do it without (for 
both) unless there's an issue doing that.

(Another alternative to (1) is to render any names/descs in encountered 
in the track layer against the point, but that duplicates marker 
functionality; and an alternative to (2) is to add an artificial attr 
for name from desc at the time of reading if name does not exist for a 
point, so the rendering doesn't need to change).

The reason I want to do this is because Maemo-mapper on the Nokia N810 
allows you to add what they call a 'mark'. This translates into putting 
a 'desc' tag on the most recent point of a track. This is the only way 
Maemo-mapper currently exports useful POI information to a GPX file; it 
is also quite convenient, especially after I modified MM to allow you to 
just touch the display anywhere to add an auto-numbered point, which is 
much easier than fiddling with hitting a small button or menu entry 
while moving on a bike.

I could have also modified the GPX writer in MM to write waypoints like 
this as stand-alone 'waypt' entries, and added 'name' and other changes 
there, but I wanted to keep the changes in MM as limited as possible so 
that the authors of MM are more likely to accept the changes, as they 
don't affect other users of MM the way I've done it.

David




More information about the josm-dev mailing list