map_match
Map matching snaps raw GPS breadcrumbs to the road network. Feed a recorded trace (2–100 points) and get back the road-accurate route that was actually driven: matched geometry, distance, time, road names, and a 0–1 match confidence. Use for fleet trace cleanup, mileage from GPS logs, and reconstructing routes from telemetry. road_names come from the route's maneuver points, so they cover the roads the route turns onto or starts on — for the name of every segment actually travelled, use trace_attributes. For planning a route between places, use directions instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | Yes | Raw GPS breadcrumb trail in travel order — 2 to 100 points of { lat, lon, time? }. `time` is optional epoch seconds; timestamps improve match quality on noisy traces. | |
| costing | No | Transport mode the trace was recorded with (default: auto) | |
| search_radius | No | Snap radius in meters around each point (1–100). Increase for noisy GPS. | |
| vehicle_profile | No | Truck preset (DRY_VAN_53, FLATBED_48, BOX_TRUCK_26, …) — same 10-profile table as directions. Implies costing=truck. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | ||
| meta | No | ||
| costing | Yes | ||
| geojson | No | ||
| matched | Yes | ||
| geometry | No | ||
| confidence | Yes | 0–1: fraction of input GPS points within the snap tolerance of the matched route | |
| road_names | Yes | ||
| distance_km | Yes | ||
| costing_options | No | ||
| vehicle_profile | No | ||
| duration_seconds | Yes |