Street routing

Snap coordinates to the network

Find the nearest road or path network locations for given coordinates. Useful for debugging routes.

get/valhalla/locate

Request

  • Base URL: https://transit.land/api/v2/routing
  • URL: https://transit.land/api/v2/routing/valhalla/locate
  • Auth: one of:
    • API key in header apikey
    • API key in query parameter apikey

Query parameters

The request object, url-encoded. Identical to the POST body. Encode spaces as %20, or send the JSON without spaces. The API does not decode + as a space and rejects the request as unparseable.

Response

Successful response

input_latnumber double

Latitude as requested.

input_lonnumber double

Longitude as requested.

reasonstring

Why nothing was found. Verbose only, and present only when edges is null.

Example response

[
  {
    "reason": "No data found for location"
  }
]

Changes

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