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.

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.

Error codes

Status code Description
200 'Wrong coordinate system!.
200 'Incorrect parameters passed!.
404 No location found. The URL is not recognized; the resource does not exist.
5xx Server error.

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"
}