Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21257 closed enhancement (fixed)

GPX export: lack of ordering breaks data consumers

Reported by: richlv Owned by: Don-vip
Priority: normal Milestone: 21.10
Component: Core Version: tested
Keywords: GPX sort track Cc:

Description (last modified by richlv)

Usecase:

  • Convert a GPX, consisting of multiple sequences, to data layer.
  • Edit it (for example, to remove a large blob while stationary).
  • Convert back to GPX, save.

Now many data consumers break - including OSM traces.
Example:

The straight line does not exist, but is drawn because the GPX is consumed sequentially.
In some cases it is much worse, with such straight lines cross-crossing the GPX display.

Other data consumers with this same problem include Strava.

Workaround - process the trace with gpsbabel like so:
gpsbabel -t -i gpx -f 2021-08-14\ 09.39.58\ Day.gpx -x track,merge -o gpx -F 021-08-14\ 09.39.58\ Day_2.gpx

This sorts the sequences (trkseg), and the trace looks good when uploaded to OSM:

This is also how the trace would look if uploaded before editing with JOSM.

Would be great, if JOSM would perform the same sorting when saving a GPX.

2021-08-14 09.39.58 Day.gpx - file, saved by JOSM
2021-08-14 09.39.58 Day_2.gpx - file, saved by JOSM, then processed with gpsbabel

Attachments (4)

2021-08-14 09.39.58 Day_2.gpx (630.8 KB ) - added by richlv 3 years ago.
2021-08-14 09.39.58 Day.gpx (635.3 KB ) - added by richlv 3 years ago.
josm-gpx.png (1.7 KB ) - added by richlv 3 years ago.
josm-gpx-gpsbabel.png (1.6 KB ) - added by richlv 3 years ago.

Download all attachments as: .zip

Change History (12)

by richlv, 3 years ago

by richlv, 3 years ago

Attachment: 2021-08-14 09.39.58 Day.gpx added

by richlv, 3 years ago

Attachment: josm-gpx.png added

by richlv, 3 years ago

Attachment: josm-gpx-gpsbabel.png added

comment:1 by richlv, 3 years ago

Description: modified (diff)

comment:2 by richlv, 3 years ago

Description: modified (diff)

comment:3 by Don-vip, 3 years ago

In 18206/josm:

see #21257 - output metadata/time during GPX export, like gpsbabel

comment:4 by Don-vip, 3 years ago

Keywords: sort track added
Milestone: 21.09
Owner: changed from team to Don-vip
Status: newassigned

comment:5 by Don-vip, 3 years ago

Type: defectenhancement

comment:6 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

In 18207/josm:

fix #21257 - sort tracks chronologically when writing GPX file

comment:7 by Don-vip, 3 years ago

In 18219/josm:

see #21257 - fix unit tests

comment:8 by Don-vip, 3 years ago

Milestone: 21.0921.10

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
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.