fjlopezs / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

Use GPX Version 1.1 #276

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to export my tracks gpx files to any site that expects 1.1.
2. garmin connect etc fail.

What is the expected output? What do you see instead?
We should mark our gpx files as being version 1.1 if we are already compliant.
We should also think about using any new features that 1.1 offers.

Original issue reported on code.google.com by sandordo...@google.com on 20 Jan 2011 at 6:39

GoogleCodeExporter commented 9 years ago
Took a look at the GPX 1.1 spec.  There were two things making the existing 
files non-compliant:

1) Right now the waypoints are after the track, but the schema calls for the 
waypoints first.  This was already marked as a todo in the code.  I reordered 
them in the TrackWriter, this patch's commit message gives more detail:

https://code.google.com/r/jaredcasper-mytracks/source/detail?r=d0b3641fe832e8043
2dcd1f61db77ef86018b00e

2) The topographix:color element is not allowed where it is in 1.1.  This patch 
moves it into an <extensions> element, which makes it compliant, and updates 
the version of the GPX file.

https://code.google.com/r/jaredcasper-mytracks/source/detail?r=94faef0918a4b7a40
4062216d291bc107d47c0c2

The topographix:color element is from a "private" schema and could be replaced 
with the color element from the more standard gpx_style schema (or just removed 
entirely).  However, I wasn't sure what client that color element was put in 
for so left it as is (albeit one level deeper in the file to conform to GPX 
1.1).

Let me know if there are comments, problems, or changes necessary or anything 
else I should do.

Original comment by jaredcas...@gmail.com on 9 Feb 2011 at 9:00

GoogleCodeExporter commented 9 years ago
Can you please post a pointer to the spec you're using, as well as to the bit 
that says the change in #2 is ok?  I glanced at 
http://www.topografix.com/GPX/1/1/ , but nothing jumped out.

Original comment by simmonmt@google.com on 9 Feb 2011 at 11:04

GoogleCodeExporter commented 9 years ago
I am indeed using http://www.topografix.com/GPX/1/1/.

The trkType says an <extensions> element of type extensionsType is okay in a 
<trk>, and the extensionsType says: "Allow any elements from a namespace other 
than this schema's namespace (lax validation). [0..*]"  (personally I'd just 
ditch the color element, but I don't know why it's in there so don't want to 
take it out :)

I've also validated the output using SAXCount as suggested by 
http://www.topografix.com/gpx_validation.asp.

Original comment by jaredcas...@gmail.com on 9 Feb 2011 at 11:43

GoogleCodeExporter commented 9 years ago
To be more clear, the color element is not part of the GPX schema/spec.  It 
comes from the schema 
http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topographix.xsd which is 
"Private GPX extensions used by TopoGrafix products".  This is the schema given 
to the "topographix" namespace in the generated gpx file, which is what the 
color element is in.

There is a more standard schema http://www.topografix.com/GPX/gpx_style/0/2/ 
that defines a color element as well.  We could use that instead of the private 
topographix one.  It would still need to be moved into the <extensions> 
element. Or we could just remove the color element (and the topographix 
namespace) all together.

Since I wasn't sure if it was in there for some downstream client that expects 
the color element from the topographix schema or something, I left it as is but 
put it in the <extensions> to be compliant.

Original comment by jaredcas...@gmail.com on 10 Feb 2011 at 12:58

GoogleCodeExporter commented 9 years ago
Issue 315 has been merged into this issue.

Original comment by simmonmt@google.com on 11 Feb 2011 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by simmonmt@google.com on 13 Feb 2011 at 4:05