How to trim the drive to the trailhead out of a GPS track
Start recording in the car park, or a few minutes before you actually leave it, and the drive comes along for the ride â a spike of speed at the start of an otherwise gentle walk, a chunk of distance and elevation that has nothing to do with your legs. It is one of the most common reasons a hiking track looks wrong afterwards, and it has a straightforward explanation and an even more straightforward fix.
The short answer
There are three ways to deal with it, in order of how much work they take. Best: never record the drive in the first place, by starting or unpausing the track once you are actually on foot. Second best: most services that accept a GPX upload let you crop the start or end of an activity after the fact, on their own site. Last resort: open the file itself and delete the points by hand, which always works because a GPX file is just a plain, editable list.
Why the drive ends up in the track at all
A GPX track has no concept of "car" or "on foot." It is a plain sequence of points, each one a latitude, a longitude, usually an elevation, and a timestamp, written down in the order the phone recorded them. Nothing in the format flags a point as belonging to a vehicle rather than a walker â that distinction only exists if a person, or an app doing stop detection, decides to draw it. Press record while you are still parking the car, and the file simply contains everything that happened between record and stop, verbatim.
The effect on your numbers is not subtle. A few minutes of driving covers a distance that would otherwise take an hour or more on foot, so total distance is inflated by more than it looks at a glance. If the trailhead sits at the top of a winding access road, the elevation gained by the car gets added to the elevation gained by your legs, and the two are indistinguishable in the final total unless something is done about it.
The cleanest fix: keep it out in the first place
The simplest solution is also the one that leaves nothing to clean up afterwards: start recording once you are standing at the trailhead, not while you are still driving to it. If you like to have the recording running before you set off â to make sure you do not forget â pause it for the drive and resume once you are walking. An app that pauses on a manual tap rather than guessing from your speed treats a paused stretch as if it never happened at all, so the drive never enters the track, the distance total, or the elevation figure in the first place.
This matters more than it sounds, because not every app tries to detect a vehicle automatically, and the ones that do get it wrong at the edges â a very slow drive through traffic can look like a fast walk, and a determined power-hike downhill can briefly look like a car. A deliberate pause avoids the guesswork entirely.
Trimming it out after the fact
In the service you uploaded to
If the drive is already baked into an uploaded activity, check the editing tools on the receiving service before reaching for anything more technical. Several mainstream platforms offer a way to crop the start or end of an activity, or to mark a section as a non-walking segment, directly on their site â look for an edit option on the activity page itself rather than in the original recording app, since the crop happens to the uploaded copy.
By re-exporting from the source
If the app that recorded the route keeps pause and resume as separate segments, or lets you review the route before exporting, it is often faster to fix it at the source and export again than to edit an already-uploaded file.
Editing the raw file directly
Because GPX is plain text XML, it never truly needs a special app. Each recorded point sits inside its own <trkpt> tag, in order, with a lat and lon attribute and, nested inside it, elevation and time. To remove the drive, you are looking for the run of points at the start (or end) of the file whose timestamps and coordinates trace the access road rather than the trail, and deleting that whole block of <trkpt> entries.
Doing this in a plain text editor is possible but tedious and easy to get slightly wrong on a long file. A dedicated GPX editor, or GIS software such as QGIS, gives you a map to click the offending stretch on instead of hunting through raw coordinates, and is the more practical route for anything longer than a handful of points.
What trimming actually fixes, and what it does not
- Distance: fixed. The driven stretch is no longer part of the total once its points are gone.
- Elevation gain: fixed, if the access road climbed. Removing those points removes their contribution to the running total described in what elevation gain actually means.
- Moving time: only fixed if the drive was ever counted as moving time to begin with â a paused stretch was already excluded, so there is nothing left to trim there.
- Anything you filmed or photographed during the drive: not touched by trimming the track. Media stays wherever it was pinned; removing track points does not remove media pinned near them, and cleaning that up is a separate, manual step.
TrailCam pauses and resumes on a manual tap, and paused time â including a drive you deliberately pause for â stays out of both the track and the moving time. A route exports as GPX 1.1 or CSV, as a single walk or your whole history at once, as part of the optional TrailCam Pro upgrade.
Questions
- Why does my hike show extra distance and elevation I did not walk?
- Almost always because recording started before the walk did â commonly while still driving to the trailhead. The GPX format cannot tell a car from a walker; it just records whatever points come in between start and stop.
- Does pausing a recording remove that stretch from the track entirely?
- With a manual pause, yes â the paused interval is treated as if it never happened, so it never becomes distance, elevation gain, or moving time in the first place. That is different from trimming, which removes points that were already recorded.
- Can I edit a GPX file without special software?
- Yes, since it is plain text XML and every point is an editable line. For more than a few points, a GPX editor or GIS tool such as QGIS makes finding the right stretch on a map far faster than reading raw coordinates.
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.