Skip to content
GuidesPlaygroundDashboard

Map Match

Match GPS coordinates to the road network
map_match.match(**kwargs) -> MapMatchResult { geometry, properties, type, legs }
POST/api/v1/map-match
ModelsExpand Collapse
class MapMatchRequest { trace, radiuses }

GPS trace to match against the road network

trace: GeoJsonGeometry { coordinates, type }

GPS trace (GeoJSON LineString geometry)

coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
radiuses: Array[Float]

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

class MapMatchResult { geometry, properties, type, legs }

Map matching result with snapped geometry

geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { confidence, distance, duration}
confidence: Float

Match confidence score

distance: Float

Total matched distance in meters

duration: Float

Estimated duration in seconds

type: :Feature
legs: Array[Hash[Symbol, untyped]]

Matched route legs between consecutive trace points