Skip to content

Files: GPX, FIT and TCX 4 MIN READ

Missing or wrong elevation in a GPX file

A GPX from a planner has no elevation; a GPX from a GPS-only watch has a rough one; a barometer's is right but drifts. Why the number is off, when Strava replaces it with its own map, and the free tools that add or fix elevation in a file.

Elevation is the least trustworthy number in a GPX file, and the one people argue about most. Three different things can be in the `<ele>` field, and knowing which one you have explains the number.

Three kinds of elevation

None. A GPX from a route planner or a race organiser often has no `<ele>` at all, or a zero on every point. The tool drew a line on a map and did not look up the ground. The route draws fine; the profile is flat, and the gain is zero.

GPS elevation. A watch without a barometer estimates height from the satellites, and it is bad at it: tens of metres of error, jumping from point to point. Every one of those jumps looks like a small climb, and a flat run can total hundreds of metres of "gain".

Barometric elevation. A watch with a pressure sensor measures height well from second to second, so the profile shape is right. But pressure drifts with the weather, so the whole profile slides up or down over hours, and a ride that starts and ends at the same door can end 30 metres higher in the file.

What Strava does with it

Strava's own help page is clear: if the device has a barometric altimeter, Strava uses the elevation in the file. If it does not, Strava replaces the GPS elevation with its own elevation basemap — a terrain model looked up at each point. That is why a GPS-only watch and Strava disagree, and why two people on the same ride with different watches get different totals.

Why the *gain* is wrong even when the profile is right

Total elevation gain is the sum of every rise, and a profile has thousands of tiny rises that are noise. Each tool decides how big a rise has to be before it counts, and they all decide differently. Same file, same profile, different total. What elevation gain actually counts has the numbers, and why Strava and Garmin disagree the two most common cases.

Fixing a file

Add elevation to a file that has none: GPS Visualizer has a free elevation tool that looks each point up on a terrain model and writes a new GPX; gpx.studio does the same in its editor. The result is the ground's height along the route, which for a planned route is the only honest answer.

Replace bad GPS elevation the same way. The terrain model is smoother and, on open ground, closer than the satellites.

Correct barometric drift: rarely worth it in the file. The print here corrects the drift when it draws the profile, and keeps the gain number from the file's own total when there is one, because the watch's number is the one you saw.

For a print

The elevation profile tool draws the profile a file supports and tells you when it does not support one. On the print, the profile is drawn from the file, drift-corrected, and the gain under the line is the file's own total when it has one. A route with no elevation prints as a route with no profile; add elevation first if you want the band.

Questions people actually ask

Why does my GPX have no elevation?
Because the tool that made it did not put any in. Route planners often leave the ele field out or set it to zero. A recording from a watch always has one, from the barometer or from GPS.
Why is the elevation gain wrong on Strava?
Strava's own help says: with a barometric altimeter, Strava uses the elevation in the file; without one, it replaces GPS elevation with its own elevation basemap. Either way the total gain depends on how the bumps are counted, and no two tools count them the same way.
How do I add elevation to a GPX file?
Run it through a tool that looks each point up on a terrain model: GPS Visualizer's elevation tool or gpx.studio both do it for free and write a new GPX. The result is the ground's height, not what you measured.
Why do Strava and Garmin show different elevation for the same ride?
They count differently. Both have the same profile shape; the gain is the sum of the rises, and each applies its own threshold for what counts as a rise. The journal has the full explanation.

YOURS, FROM A FILE, IN 90 SECONDS

One effort. One sheet of paper.

Bring the file and every choice is yours: paper, treatment, colour, which numbers come along. Uncoated matte in 250 or 170 gsm, made to order at the facility nearest you, rolled in a tube.

Print it. FROM 319 kr

More from the journal

All articles →
Did it.
Print it.
How-to · 4 MIN READ What is a TCX file, and when does Garmin give you one?
Did it.
Print it.
How-to · 5 MIN READ What is a GPX file, and how do you open it?
Did it.
Print it.
How-to · 5 MIN READ What is a FIT file? What your watch actually writes