Skip to content
GuidesPlaygroundDashboard

Match GPS coordinates to the road network

MapMatchResult MapMatch.Match(MapMatchMatchParamsparameters, CancellationTokencancellationToken = default)
POST/api/v1/map-match

Match GPS coordinates to the road network

ParametersExpand Collapse
MapMatchMatchParams parameters
required GeoJsonGeometry trace

GPS trace (GeoJSON LineString geometry)

IReadOnlyList<Double>? radiuses

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

ReturnsExpand Collapse
class MapMatchResult:

Map matching result with snapped geometry

required GeoJsonGeometry Geometry
required Coordinates Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type
One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
required Properties Properties
Double Confidence

Match confidence score

Double Distance

Total matched distance in meters

Double Duration

Estimated duration in seconds

required Type Type
IReadOnlyList<IReadOnlyDictionary<string, JsonElement>> Legs

Matched route legs between consecutive trace points

Match GPS coordinates to the road network

MapMatchMatchParams parameters = new()
{
    Trace = new()
    {
        Coordinates = new(

            [
                0
            ]
        ),
        Type = Type.Point,
    },
};

var mapMatchResult = await client.MapMatch.Match(parameters);

Console.WriteLine(mapMatchResult);
Returns Examples