Kilometre markers API

API gives the coordinates of the given kilometre marker of the specific Latvian state road.

API URL

The request URL should match the following pattern:

https://api.kartes.lv/v3//km-signs?

The response is given in JSON.

The HTTP GET request method is used.

  • client_key: Your authorisation key.

Query parameters

The request consists of the following GET parameters:

Parameter Description
cs CRS format (wgs84 or lks).
km Road kilometre.
index Road number (e.g., "A2", "V333").

Response parameters

Atbildē tiek atgriezts objekts ar šādu struktūru:

Parameter Description
x x-coordinate or longitude
y y-coordinate or latitude
km Queried road kilometre marker
index Road number (e.g., "A2", "V333").
iso_code ISO code of the country.

Examples

Input:

https://api.kartes.lv/v3//km-signs?index=A2&km=52

Response:

{
  "x": "24.851159",
  "y": "57.144002",
  "km": "52",
  "index": "A2",
  "iso_code": "LVA"
}