Match API

GET /v1/match

Match API matches given GPS points to the road network in the most plausible way. Full URL for requests is https://api.strues-maps.lt/v1/match. Only successful requests are counted towards hard limits and are billed.

Request parameters

points=long1,lat1;long2,lat2;long3,lat3;

Longitudes and latitudes must be supplied in WGS84 projection, also known as EPSG 4326. Number of coordinates supplied are only limited by maximum length of URI. At least two points must be supplied.

timestamps=t1;t2;t3

Timestamps should be number of seconds since Unix epoch. Timestamps for coordinates must be numeric and monotonically increasing.

radius=r1;r2;r3

The radius for each point should be the standard error of the location measured in meters from the true location.

api_key=your_personal_api_key

Api key is provided after registration. Api key is used for service configuration like hard limits and billing.

signature=your_personal_signature

Signature which must be used with api key is provided after registration.

Response codes

200 - Successful response

Request was successfully. Response body contains distance and duration of the fastest route between all pairs of supplied coordinates.

400 - Bad request exception

Returned if parameters are not provided or provided in an invalid format.

401 - Unauthorized

Returned if api key or signature is invalid.

429 - Too many requests

Returned if hard limits are reached.

402 - Payment required

Returned if user has insufficient funds to make a request.

500 - Internal server error

Returned if unexpected error has occurred. We are working on it to resolve it.

Response body

{
    "code": "Ok",
    "tracepoints": [
        {
            "alternatives_count": 0,
            "location": [
                23.995378,
                54.530861
            ],
            "name": "",
            "distance": 24.04809,
        }
    ]
}

code - "Ok", "NoSegment" or "NoMatch"

tracepoints[i] - array of objects representing all points of the trace in order. If the trace point was omitted by map matching because it is an outlier, the entry will be null.

tracepoints[i].alternative_count - number of probable alternative matches for this trace point. A value of zero indicate that this point was matched unambiguously.

tracepoints[i].location[0] - longitude of matching location. Longitude is in WGS84 projection, also known as EPSG 4326.

tracepoints[i].location[1] - latitude of matching location. Latitude is in WGS84 projection, also known as EPSG 4326.

tracepoints[i].name - name of street the coordinate matched to.

tracepoints[i].distance - distance to matching location in meters.