TrailCam

Guides

GPX vs KML for trail data: which one fits a hike?

GPX and KML both draw a line on a map from the same basic ingredient — a list of coordinates — but they were built to answer different questions. GPX exists to move a GPS track between devices and apps with nothing added or assumed. KML exists to make a map look a specific way inside Google Earth: which icon, which colour, which camera angle. For a recorded hike, that difference in purpose decides which one is actually the right place to keep it.

What each format is built to hold

GPX is raw GPS data

A GPX track is a plain ordered list of points, each with a latitude, longitude, usually an elevation, and a timestamp. Nothing in the format describes how the line should look on screen — no colour, no icon, no camera position. It is deliberately narrow, which is exactly why GPS receivers, watches, phones and mapping platforms all read it the same way.

KML is a presentation format

KML — Keyhole Markup Language — comes from Google Earth and is built around how a map is shown, not just where the points are. A KML file can style a line's colour and width, place a custom icon on a placemark, group content into folders, and even set a camera view for a guided tour. That is the point of the format: it describes a scene, not just a track.

Why elevation can quietly disappear in a KML viewer

A KML placemark can carry an altitude value per point, the same as a GPX track point can. Where the two diverge is what happens to that value by default: many KML viewers draw a path draped flat onto the terrain unless the file explicitly tells them otherwise, so a recorded elevation profile can be present in the file and still not show up as a rise and fall on screen. GPX carries no such setting to get wrong — an elevation value in a GPX track point is read as elevation, full stop.

This is not a flaw anyone needs to fix by hand; it is just a reminder that KML was designed around how a map looks, and a value that does not affect the picture is easy for a viewer to treat as optional.

Why that matters for a hike

A hiking or cycling platform — Strava, Garmin Connect, Komoot, Gaia GPS, CalTopo — is built around GPX, because what those tools need is the raw track: distance, pace, elevation gain, a route that can be replayed or compared against another day on the same trail. None of that depends on how the line is coloured. Hand one of those platforms a KML file and it is, at best, an awkward fit — some accept it as a rough import, most simply expect GPX and nothing else.

KML earns its place on the other side of the same trip: once a route is recorded, turning it into something to look at — a styled map embedded on a trip-report page, a custom pin for the campsite, a guided fly-through in Google Earth — is exactly what KML was built for.

Side by side

  • Purpose: GPX moves raw GPS data between devices and apps. KML controls how a map is displayed.
  • Origin: GPX is an open, vendor-neutral format published in 2002. KML comes from Google Earth and is Google's native mapping format.
  • Styling: GPX has none. KML can set line colour, icons, folders and camera views.
  • Elevation: both can store an altitude per point, but a KML viewer can flatten it onto the terrain visually unless told otherwise; GPX has no equivalent setting.
  • Compatibility: GPX is read natively by nearly every hiking, cycling and mapping platform. KML is read natively by Google Earth and Google My Maps, and more narrowly elsewhere.

Converting between them

Turning a GPX track into KML for a nicer-looking Google Earth view, or for Google My Maps, is a common and reasonable step — the shape of the route survives the conversion, and free tools such as GPS Visualizer or GPSBabel handle it in one pass. Going the other way, from a styled KML back to plain GPX, is less useful in practice: the routing platforms that want GPX only need the coordinates, and the styling that KML added has nothing to attach itself to once it lands back in a plain track.

What TrailCam exports

TrailCam records a route with GPS and exports it as GPX 1.1 or as a CSV summary, for a single walk or the whole history at once. GPX is the format that matches what a recorded hike actually is — a track with distance, elevation and timing intact — and it is what Strava, Garmin Connect and Komoot are all built to read directly, with nothing to convert first. Export is part of the optional TrailCam Pro upgrade; the app itself is free to download.

Questions

Is KML the same as GPX?
No. Both describe coordinates, but GPX is built to move raw GPS track data between devices and apps, while KML is built to control how a map is displayed — colours, icons, camera views. They solve different problems.
Can I import a KML file into Strava or Garmin Connect?
Generally not the way a GPX file imports. Hiking and cycling platforms are built around GPX; a KML file made for Google Earth usually needs converting to GPX first, and something made purely for its styling may lose meaning in the conversion.
Does a KML file keep the elevation data from a recorded hike?
It can store an altitude value per point, but many KML viewers draw the line flattened onto the terrain by default regardless of that value, so the elevation profile you recorded may not show up on screen even though the number is technically in the file.
Does TrailCam export KML?
No. TrailCam exports GPX 1.1 or a CSV summary, which is what hiking and mapping platforms expect. A GPX file can be converted to KML afterward if a specific destination, such as Google My Maps, needs it.

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