map_match
Corrects GPS drift by snapping raw GPS traces to the road network, returning matched points, confidence, and route geometry for fleet tracking and trip analysis.
Instructions
Snap a raw GPS trace to the road network to correct GPS drift and determine the actual route taken.
Returns: { matched_points: [{lat,lon}], confidence (0–1), geometry (GeoJSON LineString of matched route) }.
COORDINATE FORMAT — CRITICAL: The coordinates array uses [longitude, latitude] order (GeoJSON convention), NOT [latitude, longitude]. Correct: [[-0.1276, 51.5074], [-0.1279, 51.5078]] ← [lon, lat] Wrong: [[51.5074, -0.1276], [51.5078, -0.1279]] ← [lat, lon] — will match wrong roads
MINIMUM: At least 2 coordinate pairs required. For best accuracy, use GPS points sampled every 5–30 seconds. USE FOR: Fleet tracking post-processing, trip analysis, mileage calculation, delivery verification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coordinates | Yes | GPS trace as array of [longitude, latitude] pairs. LONGITUDE COMES FIRST (GeoJSON order). Example: [[-0.1276, 51.5074], [-0.1279, 51.5078]]. | |
| mode | No | Travel mode used for this trip — affects which road types are considered. |