Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 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:

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 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:
      <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 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 by bastiK, 12 years ago

In 5395/josm:

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

comment:2 by bastiK, 12 years ago

Resolution: fixed
Status: newclosed

In 5398/josm:

convert gpx 1.0 to 1.1 (fixes #7927)

comment:3 by bastiK, 12 years ago

In [5397]:

fix element ordering when writing gpx (see #7927)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.