tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
1.01k stars 223 forks source link

GPX track all messed up #263

Closed TheGabeMan closed 1 year ago

TheGabeMan commented 1 year ago

Downloaded GPX from https://www.provence-cycling.co.uk/cycling-routes/gravel/offer-100-2.html When opening the GPX in Komoot or Garmin Basecamp, it shows 200+ very short tracks. When in Garmin Basecamp I select all the tracks and join them to one, it turns out the track jumps from 1 to 5 to 2 to 200 to 110 to 9.... it is all over the place.

When opening the GPX in a texteditor, I see: `<?xml version="1.0" encoding="UTF-8"?>

` That is how I got to this github. Loading the gpx all the tracks seem to show correctly: ![image](https://github.com/tkrajina/gpxpy/assets/4741637/4c269490-a430-490d-9052-f02a22e9b294) But when you combine all the tracks into one: ![image](https://github.com/tkrajina/gpxpy/assets/4741637/6bd18f04-ae9b-442b-9f2e-d6c3cb0f43b3) Is there a way I can fix the order?
tkrajina commented 1 year ago

Generally, this is to report problems, not to ask "how to" questions. But it shouldn't be a problem to sort tracks/segmens by their first point's time (if there is one) or by the distance from the last pont.