Skip to main content

Map Matching API

OpenAPI Specification

2GIS Navigation API (6.0.0)

Algorithms

Reconstruct a route

Snaps noisy GPS traces to the road network, returning a reconstructed route.

query Parameters
key
required
string

Developer API key

Request Body schema: */*
required

Request parameters

required
Array of objects (QueryPoint)

An array of points for the route.

boolean or null

If true, speed limits will be added to the sections of the constructed route.

Responses

Response Schema: application/json
distance
required
number <double>

Length of the reconstructed route in meters

duration
required
number

Duration of the reconstructed route in seconds.

required
Array of objects (MatchedEdges)
required
Array of objects (MatchedQueryPoint)
route
required
string

Geometry of the reconstructed route in WKT format.

status
required
string (Status)
Enum: "OK" "FAIL"

Was the route successfully reconstructed:

  • OK - the route was successfully reconstructed,
  • FAIL - failed to reconstruct the route,

Response samples

Content type
application/json
{
  • "distance": 60.494,
  • "duration": 5,
  • "edges": [
    • {
      }
    ],
  • "query": [
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "route": "LINESTRING(82.914929 55.051096,82.914849 55.051403)",
  • "status": "OK"
}