Example prompts
- “Clean up this GPS trace from my bike ride”
- “What roads did I actually travel on during this run?”
- “Snap these GPS coordinates to roads and show me the surface types”
- “Analyse my recorded walk - what was the terrain and road quality like?”
What you get back
A confidence-scored snapped path, route with terrain analytics (ascent, descent, difficulty), and per-segment road attributes (surface type, road class, speed limit, grade). Also includes per-point match quality so you can see where GPS was noisy. Consecutive segments that share the same street names, road class, and surface are returned as a single edge — a long stretch of one road shows up once, not many times. Lengths sum across merged edges;speed_kph and grade_percent are length-weighted averages. The split is preserved whenever any of those attributes differ.
Edge attributes
Each edge carries:road_class— one ofmotorway,trunk,primary,secondary,tertiary,unclassified,residential,service. Roughly mirrors OSM’shighway=*hierarchy from biggest road type to smallest.servicecovers alleys, parking aisles, and driveways.surface— one ofpaved_smooth,paved,paved_rough,compacted,dirt,gravel,ground,impassable.compactedis a firm gravel/dirt mix;groundis natural untreated terrain.names— array of street names for the edge (often empty on unnamed paths).length_meters,speed_kph,grade_percent— numeric attributes.
road_class or surface is from the lists above.
Low-confidence matches
Whenconfidence is below 0.5 — meaning the trace couldn’t be reliably matched to the road network (sparse points, off-road, or noisy GPS) — the response includes:
match_quality: "low"— a flag indicating the match is unreliable.match_quality_reason— a short human-readable explanation.
distance_meters, duration_seconds, edges, and terrain are still populated so you can see what the engine reconstructed. The disclaimer travels alongside the data — treat numbers as approximate when match_quality is set, exact when it isn’t.
When a trace can’t be matched
Some inputs can’t produce a meaningful match — too few points, points spaced too widely, or points too far from any road. The endpoint returns 422 Unprocessable Entity with a message describing the cause (e.g."Insufficient number of trace points", "No suitable edges near input location"). Treat 422 as a “fix the input” signal rather than retrying. Common fixes:
- Sparse traces — provide more points (every few seconds, not every minute) or include
timeon each point. - Off-road points — relax
gps_accuracyorsearch_radiusso the matcher can snap further from the recorded location. - Single-mode mismatch — if a phone trace was recorded while indoors or in a tunnel, try
shape_match: "walk_or_snap"(the default) rather than strictmap_snap.
Matching strictness
The tool defaults to a forgiving matching mode (walk_or_snap) that handles typical phone-GPS noise — if a point falls a few metres off the nearest road, the tool walks the closest edge rather than rejecting the whole trace. This matches the realistic 5–15 m accuracy of urban GPS recordings.
For high-quality traces (cyclometer downloads, surveying-grade data) or when you want strict per-point snapping, the REST API exposes shape_match (edge_walk / map_snap / walk_or_snap) and gps_accuracy. Defaults are sensible for most cases — only override when you have a specific reason.
Map rendering
Responses include arender envelope with a linestring layer for the snapped trace. Pass compact: true for summary-only responses. See response defaults & controls and render envelopes.