Routing

Snap a GPS trace to roads.

Snap a noisy GPS trace to the road network and return a clean, route-shaped result — the same response envelope as /directions/v1. Provide the trace as a shape array or an encodedPolyline.

Quota cost: 1 unit per call. The shape array is capped at 100 points; requests beyond that return 400 without charging quota.

post/map-matching/v1

Request

  • Base URL: https://api.rijwind.com
  • URL: https://api.rijwind.com/map-matching/v1
  • Auth: HTTP bearer

Request body

costing'auto' | 'bicycle' | 'pedestrian' required

Routing profile. auto (car), bicycle, or pedestrian (foot).

encodedPolylinestring nullable

The GPS trace as a single encoded polyline (precision 6). An alternative to shape for compact transport of long traces.

shapeMatchstring nullable

How aggressively to snap to roads. map_snap (default) matches to the road network; walk_or_snap and edge_walk trade accuracy for speed on dense traces.

units'kilometers' | 'miles'

Example request

{
  "encodedPolyline": "_p~iF~ps|U_ulLnnqC",
  "shape": [
    {
      "lat": 52.3676,
      "lon": 4.9041
    }
  ],
  "shapeMatch": "map_snap"
}

Response

Matched route.

Example response

{
  "trip": {
    "language": "en-US",
    "legs": [
      {
        "maneuvers": [
          {
            "instruction": "Head north on Damrak."
          }
        ],
        "summary": {
          "length": 60.4,
          "time": 4810
        }
      }
    ],
    "statusMessage": "Found route between points",
    "summary": {
      "length": 60.4,
      "time": 4810
    },
    "units": "kilometers"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.