Skip to content
GuidesPlaygroundDashboard

Match GPS coordinates to the road network

POST/api/v1/map-match

Match GPS coordinates to the road network

Body ParametersJSONExpand Collapse
trace: GeoJsonGeometry { coordinates, type }

GPS trace (GeoJSON LineString geometry)

coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
array of number
array of array of number
array of array of array of number
array of array of array of array of number
type: "Point" or "LineString" or "Polygon" or 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
radiuses: optional array of number

Search radius per coordinate in meters (optional, default 50)

ReturnsExpand Collapse
MapMatchResult = object { geometry, properties, type, legs }

Map matching result with snapped geometry

geometry: GeoJsonGeometry { coordinates, type }
coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
array of number
array of array of number
array of array of array of number
array of array of array of array of number
type: "Point" or "LineString" or "Polygon" or 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: object { confidence, distance, duration }
confidence: optional number

Match confidence score

distance: optional number

Total matched distance in meters

duration: optional number

Estimated duration in seconds

type: "Feature"
legs: optional array of map[unknown]

Matched route legs between consecutive trace points

Match GPS coordinates to the road network

curl https://plaza.fyi/api/v1/map-match \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $PLAZA_API_KEY" \
    -d '{
          "trace": {
            "coordinates": [
              0
            ],
            "type": "Point"
          }
        }'
Returns Examples