tumic0 / GPXSee

GPS log file viewer and analyzer with support for GPX, TCX, KML, FIT, IGC, NMEA, SLF, SML, LOC, GPI, GeoJSON and OziExplorer files.
https://www.gpxsee.org
GNU General Public License v3.0
950 stars 130 forks source link

Segments overlap when one segment is empty #490

Closed joserebelo closed 1 year ago

joserebelo commented 1 year ago

If a gpx file contains an empty segment (<trkseg/>), the other segments will become overlapped:

image

Attached a small sample that causes the issue: empty-seg.gpx.txt

I am not sure if empty segments are expected to ever happen, but I believe the gpx standard supports them. I am currently woirking on generating gpx files for Gadgetbridge, which generated an empty trkseg due to a bug. I have since fixed it, but felt like I should open this issue, since the fix is probably trivial. Feel free to close this if you consider the gpx file invalid.