How to make a GPX route that follows roads, not straight lines
Draw a route that sticks to real roads, fix a file that cuts corners, and check every bend before you load it.
The short answer
To make a GPX route that follows roads, draw it in a route planner with routing switched on, so each click snaps to mapped roads, and keep straight-line drawing for short gaps the map lacks. Export it as a track. If a file already cuts corners, re-route or map-match it, then zoom in on every bend.
Key takeaways
- Straight-line drawing modes, too few points and GPS drift are the usual reasons a GPX cuts corners.
- Strava, Komoot, Ride with GPS, Garmin Connect and gpx.studio snap to roads unless you switch it off.
- Points every 100 m (330 ft) suit straight roads; tight bends need one every 10–25 m (33–82 ft).
- Map matching fits a rough line or a recording onto the road network in the most plausible way.
Definitions
- Routing (snap to roads)
- The planner works out the path between your clicks along mapped roads and paths, copying the shape of each road.
- Straight-line segment
- A piece of route joined point to point with no regard for roads; Komoot calls it off-grid, Ride with GPS calls it Draw Lines.
- Map matching
- Fitting a series of GPS points onto the road network, so a rough line or a recorded ride becomes one that follows real roads.
Why does a GPX route cut corners?
A GPX route cuts corners when its points are joined by straight lines that ignore the road. Making a GPX route that follows roads is one step in planning a cycling route; here's how to draw one, fix one and check it.
Every app draws a straight line between neighbouring points, as our guide to GPX files for cycling explains. So the line is only as good as its points. Four things usually go wrong:
- Straight-line drawing. One click in a planner's straight-line mode can put a line across a field or a lake.
- Too few points. Thinning tools, such as gpx.studio's Minify, drop points to shrink a file.
- GPS drift. A recorded ride is a log, not a plan, and the signal can wander in valleys and cities.
- Missing roads. A planner can't route along a track that isn't on its map.
How far off can a straight line be?
It depends on the gap between points and the tightness of the bend. This is the furthest the line strays from the road, from our geometry in the method below.
| Point spacing, m (ft) | Tight bend, 50 m (164 ft) radius | Sweeping bend, 200 m (656 ft) radius |
|---|---|---|
| 10 (33) | 0.3 m (0.8 ft) | 0.1 m (0.2 ft) |
| 25 (82) | 1.6 m (5.2 ft) | 0.4 m (1.3 ft) |
| 50 (164) | 6.7 m (22 ft) | 1.6 m (5.1 ft) |
| 100 (328) | 50 m (164 ft) | 6.4 m (21 ft) |
At 100 m (330 ft) spacing, a hairpin disappears. On an alpine pass in Italy or a coast road in California, that's a whole switchback missing.
How do route planners handle "follow roads" and straight lines?
All the main planners snap to roads by default and offer a straight-line mode for gaps, under different names. This is what each one's own help said, as of October 2026.
| Planner | Default: follows roads | Straight-line option | Fixing an imported file |
|---|---|---|---|
| Strava | Snaps to the nearest roads or trails | Manual Mode (in the app) | Not covered in its help |
| Komoot | Routes along its known roads and paths | Untick Follow ways (off-grid) | Match route to known ways |
| Ride with GPS | Cycling, Walking or Driving mode | Draw Lines | Trace, Auto-Trace (paid plans) |
| Garmin Connect | Follow roads or popular routes | Freehand | Not covered in its guide |
| gpx.studio | Routing on, over OpenStreetMap | Turn routing off | Drag anchor points to re-route |
Want this for your own route? Windline shows the wind for every stretch, timed to your pace. Free. Make a free ride page →
How do you draw a GPX route that follows roads?
Switch routing on, pick your activity, click where the route turns, and use straight lines only for a known short gap.
Step 1: Set the routing mode
Choose cycling, and road or gravel if asked.
Step 2: Click at junctions
Place a point where you turn, and the router fills in the road's shape, bends included. If it picks the wrong road, add a point on the right one. Ride with GPS calls these control points: they pin the line in place.
Step 3: Use straight lines sparingly
Ride with GPS suggests Draw Lines only for short gaps its map can't route, such as car parks. Komoot can't guarantee an off-grid section is passable. Switch routing back on once you're past.
Step 4: Export a GPX track
Export a track, which keeps every point, not a GPX route of turn points that your device joins up itself. For Strava, see exporting a GPX file from Strava.
How do you fix a GPX file that cuts corners?
Re-route it in a planner, then compare the new line with the old one.
- Komoot: on import, Stick to original route keeps the line with off-grid sections; Match route to known ways replans those parts along the best alternatives.
- gpx.studio: open the file in the routing tool and drag an anchor point; that segment is re-routed over OpenStreetMap roads.
- Ride with GPS: Auto-Trace turns a track into a navigable route for paid members. It says to double-check the result.
The general technique is map matching. The OSRM documentation describes it as matching GPS points to the road network "in the most plausible way". Valhalla searches up to 100 m (330 ft) from each point for candidate roads. Most plausible isn't always right: a matcher can pick the service road beside a highway.
How do you check the route really follows the roads?
Zoom in on every bend and junction over satellite imagery, and look for segments that are perfectly straight or dotted. Our guide to checking a cycling route before you ride it has the full checklist. For road-following, look for:
- Lines across nothing: fields, water, buildings or the inside of a hairpin.
- Dotted segments: Komoot draws off-grid sections that way.
- A jump to a parallel road: a common slip near motorways and dual carriageways.
- A short distance: straight lines are shorter than the road. Across a 15 m (49 ft) radius hairpin, the line is 30 m (98 ft) and the road 47 m (154 ft).
What if the road you want isn't on the map?
Draw a short straight line over it, then check it in satellite and street-level imagery before you ride.
gpx.studio and Valhalla route over OpenStreetMap, which anyone can edit. A gravel road in rural Australia or a new cycle path in the Netherlands may be missing; adding it helps every planner. Private roads are different: gpx.studio can route over them, but warns to do so only with local knowledge and permission.
Frequently asked questions
Why does my bike computer say I'm off course on a re-routed GPX?
The re-routed line may no longer sit on the road you're riding. Komoot's help says Match route to known ways can replan parts of a file and shift its start or end, so a Garmin or Suunto may warn you're off route. Its fix: import with Stick to original route, then adjust waypoints by hand.
Does the Strava route builder snap to roads?
Yes. Strava's help says the route you draw snaps to the nearest roads or trails, and a road-bike route fills in on paved surfaces, based on where other athletes have ridden. For a path it won't follow, the Strava app's Manual Mode adds a straight line from point to point.
Is a straight-line segment ever the right choice?
Yes, for a short stretch the map doesn't know. Ride with GPS suggests Draw Lines for car parks and unmapped streets, used sparingly, and notes it builds no cue sheet. Komoot says off-grid sections suit a path missing from its database, but can't guarantee they're passable. Check any straight segment in satellite imagery first.
How many points should a cycling GPX file have?
There's no fixed number; spacing matters more. By our geometry, a point every 100 m (330 ft) keeps the line within about 6 m (21 ft) of a sweeping bend but 50 m (164 ft) off a hairpin. Tight bends need a point every 10–25 m (33–82 ft). Routed lines usually have that already.
Can map matching clean up a recorded ride with GPS drift?
Usually. Engines such as OSRM and Valhalla snap recorded GPS points to the most plausible roads, so a wandering track ends up on the road. Valhalla's guide suggests points recorded between once a second and once every 10 seconds. Check the result, because a matcher can pick a parallel road or a service lane.
Get the wind for your ride.
Upload a GPX, add your start time and pace, and see the headwind, gusts, rain and heat for every stretch of the route, timed to when you’ll be there. Free for riders.
Make a free ride page →Sources and method
- Strava Support (2026). Creating Routes on Mobile
- komoot (2026). Route planner help (off-grid routing and Follow ways)
- komoot Help Center (2026). Export and import Routes and Activities
- Ride with GPS Help Center (2026). Route Planning 101
- Ride with GPS Help Center (2026). Auto-Trace in the App
- Garmin (2023). How to build a course in Garmin Connect
- gpx.studio (2026). Route planning and editing (help)
- gpx.studio (2026). Minify (help)
- Project OSRM (2026). OSRM API documentation, Match service
- Valhalla (2026). Map Matching service API reference
Planner behaviour comes from each product's own help pages, opened on 11 October 2026 and logged in the evidence file; Garmin's description is from its own guide dated 6 October 2023. The corner-cutting table is our geometry: a straight line (chord) of length c across a bend of radius R sits at most s = R − √(R² − (c/2)²) from the road, at the middle of the chord. A 50 m radius stands in for a tight hairpin, 200 m for a sweeping bend; the 100 m chord on the 50 m bend is the full width of a hairpin, so s equals the radius. The hairpin example compares half a circle of radius 15 m (π × 15 = 47 m) with its 30 m chord. Conversions: 1 m = 3.28 ft, rounded.
About the author
Wes Thomson, Founder, Windline. Wes Thomson builds Windline, live wind and weather forecasts timed to when riders reach each stretch of road. He built it for his own 2,093 km tour from Pont Drift to Cape Town, and writes these guides with the same focus: what the wind will do to your ride, and how to plan around it.