Showing results for 
Search instead for 
Did you mean: 

GPX import ignores trkseg XML tags thus violating GPX specification and counting wrong distance


It looks like Strava's GPX importer completly ignores "trkseg" XML tag. In attached file there are two segments.

GPX file contains one track (trk XML tag). This track can have one or more segments (trkseg XML tag). Segment have points (trkpt XML tag). Distance should be counted as distance between all points inside one (and every) segment but not between segments.

Let's have one track with two segments.

First segment: point A, point B, point C
Second segment: point D, point E

Distance should be counted as:
track_distance = distance(A, B) + distance(B, C) + distance(D, E)

You count it as:
track_distance = distance(A, B) + distance(B, C) + distance(C, D) + distance(D, E)
(which is wrong, distance between C and D must not be in total distance)

Distance between last segment point and first point of next segment must not be counted in whole distance.

According to GPX specification:
A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.

Last Track Point of Segment is not logically connected to next Track Segment. You are violating specification and counting completely wrong summary distance.


Mt. Kenya

Obvious errors as desired characteristics... Strava is so bad, I definitely won't pay any money for it. 


yes, manual or auto pauses should create new segments in GPX.


For me it reads like a bug too if it violates standards. I don't know much about gpx internals, are pauses (manual pauses or auto pauses) as well recorded with these tags? That would explain why so many complain that Strava includes elevations and distances that happens during pauses, like when using lifts or ferries.


Yep, try to explain it to support. I did many times. Their reply:

With GPX files, our system calculates the distance between each GPS point for your overall distance. I understand that would like distance between these “segments” excluded, but this is currently not possible.

This is the the way our system currently works. If you would like it to work differently, I recommend submitting your feedback directly to our Community Hub.

Pico de Orizaba

This shouldn't be in section Ideas, it is a bug and must be fixed!

Moderator Moderator

Thanks for submitting your idea. It has been reviewed by our moderation team and is now open to voting.

STRAVA | Community Hub Team

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!

Know how to use Community

Understand Community Settings