TrailCam

Guides

Does a GPX file store elevation in feet or meters?

Meters, always, no matter which phone recorded the file, which country it was recorded in, or whether the app showing it to you is currently set to feet. A GPX file has no field for choosing a unit and no flag anywhere that says which one is in use, because the format only ever writes one: metres. Any app that shows you a climb in feet is doing that conversion itself, at the moment it displays the number, not reading it out of the file that way.

The short answer

Every elevation value in a GPX file is a plain number of metres, written inside an <ele> tag attached to a recorded point. There is no companion field saying "this is in metres" and no alternative tag for feet — the format simply committed to one unit and never deviates from it, on any device, in any country, regardless of what unit a person reading the file afterwards might prefer. A value of 312 inside an <ele> tag means 312 metres, full stop, whether the file came from a phone in Tokyo or a GPS unit in Denver.

Why the format picked one unit and stuck with it

GPX exists so a route recorded on one device opens correctly in a completely different piece of software — a phone in one country, a mapping tool built in another, a spreadsheet neither company had in mind when the file was written. That kind of interoperability only works if every number in the file means the same thing to every piece of software that reads it, with nothing left to guess. A unit that could be either feet or metres depending on some other setting would force every reading application to first figure out which one applied before it could even draw a climb profile, and a single missing or misread flag would silently turn a real number into the wrong one. Fixing the unit once, for good, removes that entire category of failure. It is the same reasoning that keeps GPS coordinates themselves in one consistent form rather than letting each device pick its own.

Where the feet conversion actually happens

If you are looking at a climb total in feet anywhere — on a phone screen, inside a mapping app, on a website that accepted an uploaded GPX file — that number was calculated at the moment it was displayed, not read directly out of the file. The app took the metric value sitting in the <ele> tags, multiplied it by roughly 3.28, and rendered the result in whichever unit its own settings or your regional preference call for. The file underneath never changed. Two apps can open the exact same GPX file, one showing a route's climb as "410 m" and the other as "1,345 ft", and both are reading identical numbers — they are just presenting the same data in the units their own audience expects.

What this looks like if you open the file yourself

Open a GPX file in a plain text editor and every point looks something like <trkpt lat="..." lon="..."><ele>412.3</ele><time>...</time></trkpt>. That 412.3 is metres, not feet, even if the phone that recorded it had its display set to miles and feet for everything it shows on screen. The app's own interface and the file it writes are two separate things: the interface adapts to whatever unit you have chosen to look at, but the file underneath keeps a single, fixed representation so it means the same thing to whoever opens it next, on whatever device that turns out to be.

Things that trip people up

  • Assuming a raw number in an <ele> tag is already in feet because the phone that recorded it displays distances in miles — the two settings are unrelated; the file is metric regardless of what the screen shows.
  • Looking for a unit setting inside the GPX file itself — there is not one, because the format never offers a choice in the first place; the unit is fixed by the specification, not configured per file.
  • Worrying that importing a GPX file into an app set to a different unit than the one you use will silently convert the numbers wrong — the importing app reads the same fixed metric value every time and converts it correctly for display, the same conversion any other compliant app would make.
  • Assuming two files from two different regions might use two different units — they cannot, by the format's own rules; any GPX file that stores elevation in anything other than metres is not following the specification, which is rare and is a fault in whatever wrote it, not a regional variation.

Where TrailCam fits in

TrailCam writes an elevation value for every point it can, using GPS and, on most iPhone models, a barometric sensor as well, and exports the finished route as GPX 1.1 — a single walk or your whole history at once — where those values sit in metres like any other GPX file. The elevation gain shown on the route itself, and spoken during a walk, follows whichever unit you have set, the same way distance does. Export is part of the optional TrailCam Pro upgrade; the app itself is free to download.

Questions

Can a GPX file store elevation in feet instead of meters?
Not according to the specification. GPX elevation values are always metres; an app can convert to feet for display, but the number stored in the file itself never changes format.
How do apps show elevation in feet if the file only has meters?
They convert at the moment they display the number — multiplying the stored metric value by roughly 3.28 — rather than reading a different unit out of the file. The file itself is untouched by that conversion.
If I open a GPX file in a text editor, how do I know the numbers are in meters?
You do not need to check — the specification fixes it. Any number inside an <ele> tag is metres, regardless of which device wrote the file or what unit its own display was set to at the time.

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.

Download on the App Store