oss

Which trail junction disappears when GPSBabel shortens a route?

5 sources 0 primary sources December 1, 2026

Loading reads and saves…
Text

Imagine borrowing a friend's recording of a walk. Halfway along a ridge, the trail forks. Your friend kept straight. You want that junction marked on your handheld, especially on the way back. Yet if you use GPSBabel to turn the recording into a route small enough for the receiver, the fork is just the sort of point that can disappear. Two filters make the decision at different stages. One decides what the coordinates represent. The other decides which coordinates earn space on the device. [1][2]

A collection of GPS receivers, including handheld units and a wrist-worn Garmin.
Receivers photographed together in 2007 include a Garmin Forerunner wrist unit, a Magellan Meridian and a Trimble GeoXH. Photograph by Geonarva, resized under CC BY-SA 3.0. [3]

The same walk, written twice

Open a GPX file in a text editor and the point's parent element tells you what job it has. A recorded track groups its samples into segments. Inside a segment, each fix appears as a <trkpt> and can carry the time the receiver took it. A route holds an ordered sequence of <rtept> elements describing places to pass on the way to a destination. GPX can hold both versions of a walk in the same file. A mapping application can draw remarkably similar lines from them. [4]

Suppose the input contains one continuous track. Here is a conversion for an illustrative receiver with room for thirty route points. The backslashes continue one shell command across three lines. [1][2][5]

gpsbabel -i gpx -f ridge-track.gpx \
  -x transform,rte=trk,del -x simplify,count=30,crosstrack \
  -o gpx -F ridge-route.gpx

Read the middle line from left to right. The first filter takes the fixes in the track and makes route points in their recorded order. The del option drops the source track from the data passed forward. The original file stays on disk because the writer has a different filename. Stop after that first filter and a morning's worth of closely spaced fixes can become a morning's worth of route points. Changing type has done nothing to settle the receiver's space problem. [1][5]

What the fork looks like to the filter

Picture three consecutive fixes. The first is twenty metres before the fork, the middle one is beside the signpost, and the third is twenty metres beyond it. Draw a line between the outer two. If the middle fix lies exactly on that line, removing it moves the drawn path sideways by zero metres. Now picture three fixes around a sharp switchback. Draw the same line across the bend and it misses the middle fix by several metres. [2]

That sideways miss is what the cross-track method measures. It removes the point with the smallest geometric effect first and continues trimming to the requested count. Thirty is a ceiling. It says nothing about how far apart the survivors will be. A twisty climb can spend several points on a single hillside while a long straight ridge gets very few. The filter sees the three coordinates at the fork. The branch your friend never walked contributes no coordinates at all. [2]

That gives a walker two different things to check in the exported file. Counting the route points answers whether the route fits. Looking up the fork answers whether the point needed on the return walk survived. If the junction matters in its own right, GPX can store a named, standalone waypoint at the signpost. On a receiver that accepts waypoints as well as routes, that gives the walker a location to look up even when the line runs straight through. The full track can stay at home as the record of where the friend actually went. [4][5]

Sources

  1. GPSBabel 1.10.0, Transform waypoints, tracks and routes.
  2. GPSBabel 1.10.0, Simplify routes.
  3. Geonarva, GPS Receivers 2007, Wikimedia Commons.
  4. Topografix, GPX 1.1 schema documentation for waypoints, routes and track segments.
  5. GPSBabel 1.10.0, Route and Track Modes, including receiver capacity limits.
Previous Why OpenDrop keeps the needle in the photograph Next Why pushing a pawn beats checking the king

Recommended In oss

Matched by subject and format