Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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:


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>

text and type are optional, but the <link> element can occur multiple times (in contrast to url/urlname)

  • Extensions are handled differently. In GPX 1.0 it looks like this:
        <josm:test> random stuff here </josm:test>
    And in GPX 1.1 like this:
        <link href="/user/..."/>
          <josm:test> random stuff here </josm:test>
  • In GPX 1.0, properties like name or desc 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 fields author and email in GPS 1.0 have been changed to one complex element <author> with name, email and link as children. The properties <copyright> (complex type) and time 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 and speed have been removed.
  • Extensions are possible for <trkseg> in GPX 1.1.

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by bastiK

In 5395/josm:

gpxreader: minor refactoring, read version & creator (see #7927)

comment:2 Changed 11 years ago by bastiK

Resolution: fixed
Status: newclosed

In 5398/josm:

convert gpx 1.0 to 1.1 (fixes #7927)

comment:3 Changed 11 years ago by bastiK

In [5397]:

fix element ordering when writing gpx (see #7927)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.