Skip to main content

Map matching / GPS trace snapping

POST 

/v2/route/match

Snaps a GPS trace to the road network using Valhalla's map-matching engine. Returns the matched route geometry, turn-by-turn steps, and divergence metrics.

Use cases:

  • Route adherence — did a field agent follow the planned route?
  • Trip verification — did the collection agent actually visit the borrower's hex zone?
  • Mileage auditing — accurate distance from noisy GPS for reimbursement calculations
  • Fraud detection — GPS trace that doesn't match a known road pattern is suspicious

The divergence_ratio is matched_distance / gps_distance. A ratio above ~1.3 suggests the agent went off-road or the GPS trace contains significant noise.

Limits: 2–500 trace points per request. Timestamps are optional but improve matching accuracy on complex intersections.

Request

Responses

Trace matched successfully