#7927 closed defect (fixed)
GPX export does not care for GPX 1.0 -> GPX 1.1 translation
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Currently the OSM server returns GPX 1.0 xml when you request raw GPS data. If you save that layer to a file in JOSM, the result is not a valid GPX file. Basically JOSM saves as GPX 1.1 (no matter what the input format was) but does not care for the differences of these versions.
A second (unrelated) reason why the validation fails, is that JOSM writes the attributes in random order, but the order is clearly defined in the schema file.
GPX 1.0: documentation schema
GPX 1.1: documentation schema
Here is a list of differences (should be complete):
- GPX 1.0 has
url/urlname
string properties. They are gone in GPX 1.1 and replaced by by a complex element <link> of the form<link href="http://..."> <text> string value </text> <type> string value </type> </link>
text
andtype
are optional, but the <link> element can occur multiple times (in contrast tourl/urlname
)
- Extensions are handled differently. In GPX 1.0 it looks like this:
<trk> <desc>...</desc> <name>...</name> <url>http://api.openstreetmap.org/user/...</url> <josm:test> random stuff here </josm:test> ... </trk>
And in GPX 1.1 like this:<trk> <desc>...</desc> <name>...</name> <link href="/user/..."/> <extensions> <josm:test> random stuff here </josm:test> </extensions> ... </trk>
- In GPX 1.0, properties like
name
ordesc
are direct children of the <gpx> element. In GPX 1.1 they are grouped inside a <metadata> element. Also the allowed properties are different: The string fieldsauthor
andemail
in GPS 1.0 have been changed to one complex element <author> withname
,email
andlink
as children. The properties <copyright> (complex type) andtime
have been added in GPX 1.1.
- For the <rte> and the <trk> element, the property
type
has been added in GPX 1.1.
- For <trkpt>, the old properties
course
andspeed
have been removed.
- Extensions are possible for <trkseg> in GPX 1.1.
In 5395/josm: