Road information API

The API allows to get specific information about the Latvian state roads by given coordinates.

API URL

The request URL should match the following pattern:

https://api.kartes.lv/v3//roaddetail?

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
x x-coordinate in a Web Mercator projection (EPSG:3857)
y y-coordinate in a Web Mercator projection (EPSG:3857)

Examples

Input:

https://api.kartes.lv/v3//roaddetail?x=2751386.663054411&y=7707654.346166896

Response:

{
  "type": "FeatureCollection",
  "name": "Road Detail",
  "crs": {
    "type": "name",
    "properties": {
      "name": "urn:ogc:def:crs:EPSG::3857"
    }
  },
  "features": [
    {
      "type": "Feature",
      "geometry": null,
      "properties": {
        "geom": "{\"type\":\"LineString\",\"coordinates\":[[2751443,7707713],[2751379,7707663]]}",
        "kategorija": "25",
        "klase": "A1",
        "klase_v": "A",
        "segums": "3",
        "rajons": "Ogres nodaļa",
        "distance": "6.39132735250261"
      }
    }
  ]
}