Skip to main content

Labs — Maps & navigation

Labs

GPX Track Simplifier (Douglas–Peucker)

A recorded track is generous to a fault. Receivers log a point every second or few meters, so a day's walk becomes thousands of points, most of them saying nothing the points around them do not already say. For sharing, mapping, and archiving, what matters is the shape of the route, and the classic tool for keeping shape while discarding bulk is the Douglas–Peucker algorithm, published in 1973. It works recursively: draw a line from the first point to the last, find the recorded point farthest from that line, and if that distance exceeds your chosen tolerance, keep the point and repeat on both halves. Points that never stray beyond tolerance from a straight chord are dropped.

Paste a GPX file below, or upload one: everything is parsed in your browser with a file reader, and nothing leaves your device. Set the tolerance in meters, simplify, and compare point counts and distances before and after, with the simplified track drawn on the canvas. Elevation is lightly smoothed with a moving average so single-point spikes do not survive as false climbs. The download button returns a simplified GPX built from your own track, for your own use.

Tolerance is a judgment, not a setting to maximize. A small tolerance preserves switchbacks and shoreline wiggles; a large one straightens a mountain path into a sketch. Watch the distance figure as you experiment: heavy simplification shortens distance, because every cut corner is distance the walker actually covered.

Loading…

Reading the result

Compare the drawing against your memory of the route before trusting the file. If a loop, spur, or detour matters, it should still be visible; if it has vanished, lower the tolerance and run it again. Simplification is for copies: keep your original recording untouched as the record of the day, and treat the simplified file as the shareable edition.

Sources

Douglas DH, Peucker TK. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartographica 1973;10(2):112–122. GPX format: Topografix GPX 1.1 schema documentation.