How to add elevation data to a GPX file that has none
A GPX track only strictly needs two numbers at each point to draw a line on a map: latitude and longitude. Elevation is a separate, optional value, and plenty of files never get one — a route drawn by hand in a planning tool, or a track from a receiver that lost its vertical fix, comes out with a shape but no height. The fix is not to go back and re-measure the hike. It is to ask a different source entirely how high the ground is at each point the file already claims to pass through.
The short answer
Run the file through an elevation correction tool. Instead of reading an altitude the file never captured, the tool looks up each point's latitude and longitude against a digital elevation model — a public dataset of ground height covering the whole planet — and writes that looked-up value in as the point's elevation. Several platforms that already accept GPX uploads offer a version of this on the activity or route page itself, usually worded as something like "elevation correction" or "correct elevation." Standalone tools built specifically for this exist too, such as GPS Visualizer, which takes a GPX file with no elevation at all and hands one back with a value filled in for every point, with no upload to any account or platform required.
Why the file had no elevation to begin with
A GPX <trkpt> element carries latitude and longitude as required attributes, and an elevation tag as an optional child. A route drawn by hand on a map — plotting a line rather than recording one from an actual walk — has no altitude to write, because nothing was ever measured at any point along it. A track recorded live can end up the same way if the receiver had a fix on position but not on height for a stretch, which happens more easily than a missing horizontal fix, since working out how high something is needs a stronger satellite geometry than working out where it is on the ground.
What an elevation correction tool is actually doing
It is not re-measuring anything from the day you were out. It takes the coordinates already sitting in the file, looks each one up against a model of the terrain built from satellite and aerial survey data, and substitutes that model's value for whatever the point currently says — nothing, a zero, or a live reading that happens to be noisy. The result is a value for how high the ground is at that latitude and longitude, not a value for how high a GPS receiver measured itself to be while standing there.
That distinction is also why the same tool is worth running on a file that already has elevation, not only one with none. GPS altitude is measured live and carries real noise from one point to the next; a model lookup carries none, because it is reading a fixed dataset rather than a wobbling receiver. Swapping one for the other tends to make a jagged, unbelievable elevation gain total look smoother and closer to something you would trust.
What it does not know about
- Anything that puts you above the ground without moving you sideways — a footbridge, a boardwalk over a bog, a fire lookout tower. The model reads the height of the terrain at that coordinate, not the height of whatever structure you were standing on.
- Small, sharp terrain features that are narrower than the model's own resolution — a short rock step, a single stair-like ledge on a scramble. A model built from a grid of sampled points can only represent detail down to the size of that grid; anything smaller gets smoothed away along with the genuine noise.
- Whether the coordinates themselves are accurate. If the underlying GPS positions drifted sideways, the correction confidently looks up the elevation of wherever those drifted points landed, not the elevation of where you actually were.
Things that trip people up
- Expecting the corrected file to reflect the actual day, weather, or conditions of the hike — it reflects a static model of the ground, not anything that happened while you were on it.
- Comparing a corrected file's elevation gain against an uncorrected one from a different app and assuming the lower or smoother number is the "wrong" one — they were built from two different kinds of input, live readings versus a model lookup, and disagreeing is normal rather than a sign either one is broken.
- Assuming correction fixes bad distance or timing along with elevation — it only touches the elevation field on each point; latitude, longitude, and timestamps are left exactly as they were.
- Running correction on a file and expecting a bridge, tower, or platform to still show its true height — the model has no idea you were standing on one.
Where TrailCam fits in
TrailCam records elevation live as part of every point while a route is being tracked, so a GPX file exported from a hike recorded in the app already carries an elevation reading for the whole route — this is not something a TrailCam export needs done to it afterward. The situation this guide covers mostly comes up with tracks from somewhere else: a route drawn by hand in a planning tool, an older device, or another app that did not capture altitude in the first place. TrailCam exports as GPX 1.1 or CSV, and export is part of the optional TrailCam Pro upgrade; the app itself is free to download.
Questions
- Does elevation correction change the distance recorded on my hike?
- No. Distance is calculated from the latitude and longitude at each point, and correction only rewrites the elevation value — position and timestamps are left untouched.
- Will this fix a wrong elevation gain total on a file that already has some elevation data?
- Often, yes. A model lookup replaces whatever altitude values were already there, jittery or not, which tends to smooth out an unbelievably high or jagged total. It can also flatten small real terrain features that are too fine for the model to represent.
- Do I need to upload my file to a training platform to add elevation to it?
- No. Standalone tools built specifically for this, such as GPS Visualizer, take a GPX file with no elevation and hand one back with it filled in, without needing an account or a permanent upload anywhere.
Recording your own routes
TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.