paoservis / osmtracker-android

Automatically exported from code.google.com/p/osmtracker-android
GNU General Public License v3.0
0 stars 0 forks source link

Use <cmt> rather than <name> for waypoint description in GPX file #155

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce: Record a track including some waypoints, and then export to 
a GPX file.

In the GPX file, to make the <name>s of waypoints unique to each waypoint, a 
number is appended to the end if the same waypoint is used multiple times.

Instead of doing this, I think it would be better to store the waypoint 
description text in the <cmt> field. The <name> field could then be used as a 
sequential counter, something like "001", "002", etc. corresponding to the 
order in which the points were recorded.

This has a few advantages:

1/  The cmt field is more suitable for the description since multiple waypoints 
can have the same text, and typically longer text is allowed / shown on GPS 
devices.

2/ You won't have an annoying number appended to end of the descriptive text.

3/ The order in which waypoints were recorded will now be obvious in programs 
that list them by name, thanks to the counter in the <name> field.

(I'm using v0.5.5 of OSMTracker for Andtroid, on an HTP Wildfire S with Android 
2.3.3.)

Original issue reported on code.google.com by robert.w...@gmail.com on 28 Aug 2011 at 4:05

GoogleCodeExporter commented 9 years ago
Hi, could you post an example GPX file / snippet showing the problem please ?

If you're talking about the number between parenthesis it's not an identifier 
but is the approximate accuracy information in meters for this waypoint. This 
can be turned off in the settings, or you can also choose to have the <name> 
tag containing only the name and the <cmt> tag containing the accuracy 
information.

Original comment by nicolas@guillaumin.me on 29 Aug 2011 at 8:52

GoogleCodeExporter commented 9 years ago
Sorry, it seems I was wrong about the numbers being added by OSMTracker -- the 
GPX file it produces just contains the right text in the <name> element. It's 
the Garmin software (MapSource) that seems to insist on unique names and 
automatically adds the numbers to the end to make them unique.

So if I had a file from OSMTracker with two waypoints with the same name, eg 
"Track", one would appear as "Track" and the other as "Track1" when I load the 
GPX file into MapSource.

(I can't see anything in the GPX spec that says that the <name> for each 
waypoint has to be unique, but it seems that Garmin's software and the GPS unit 
I have enforce this.)

That said, I still think it would be better to use <cmt> for the description 
from OSMTracker and use the <name> field for a sequential counter, for the 
other reasons mentioned above.

Original comment by robert.w...@gmail.com on 29 Aug 2011 at 4:17

GoogleCodeExporter commented 9 years ago
I guess it depends on the app. used to process the track. I suspect JOSM for 
example expects the name to be in <name>... Maybe a user preference might do 
the trick.

Original comment by nicolas@guillaumin.me on 28 Jul 2012 at 7:47

GoogleCodeExporter commented 9 years ago
I've looked at a lot of uploaded tracks lately, and I'd say most of them use 
<name> to hold the waypoint name.  Some use <cmt> for related info; for 
instance, http://www.openstreetmap.org/user/capataz/traces/1286717 (apparently 
created with Garmin Desktop) has a date in there.

I haven't seen one that uses cmt instead of name, but I'd be interested in such 
an example.

Original comment by jdmo...@nand.net on 13 Aug 2012 at 3:52