You can find information about two different APIs, which are based on the open data of the Latvian State Land Service's Cadastre Information System. Information about the cadastral information layer WMS can be found here here.

Parcel and building search

Autocomplete search, that allows to find specific parcel or building by its cadastral number, and get their geometry.

API URL

The request URL should match the following pattern:

https://api.kartes.lv/v3//search?layers=cadastral

By default, the response is given in JSON (JSONP and XML are also available).

The HTTP GET request method is used.

Query parameters

The request consists of the following GET parameters:

Parameter Description Available values
q Cadastral number (11 digits for parcels, 14 digits for buildings).
limit Maximum number of returned objects. Up to 50 objects can be returned.
mode
  • compact
  • full
layers
  • cadastral - cadastral parcel
  • cadastral_building - cadastral building
format
  • standart
  • (JSON; default value)
  • geojson
geometry
fields Fields that should be in the response (comma separated).
  • name - cadastral number
  • iso_code - country ISO CODE
  • the_geom - geometry in WKT
cs Coordinate system (optional parameter). By default, the WGS-84 (EPSG:4326) coordinates are used. The parameter allows to set other CRS.
  • wgs84 - WGS-84 (EPSG:4326)
  • lks - TM Baltic93 (EPSG:25884)

Response parameters

The response consists of the queried cadastral number, its properties, CRS, with an array of objects with parameters defined by the fields parameter.

Error codes

Status code Description
400 Wrong input data. Server can’t respond due to client error.
404 No location found. The URL is not recognized; the resource does not exist.
5xx Server error.

Examples

Input:

https://api.kartes.lv/v3//search?q=01000242161&fields=name,the_geom&format=geojson&layers=cadastral

Output:

{
   "cadastral":{
      "type":"FeatureCollection",
      "name":"cadastral",
      "crs":{
         "type":"name",
         "properties":{
            "name":"urn:ogc:def:crs:EPSG::4326"
         }
      },
      "features":[
         {
            "type":"Feature",
            "geometry":{
               "type":"Polygon",
               "coordinates":[
                  [
                     [
                        24.121745,
                        56.973326
                     ],
                     [
                        24.123015,
                        56.973876
                     ],
                     [
                        24.123056,
                        56.973848
                     ],
                     [
                        24.12386,
                        56.973294
                     ],
                     [
                        24.12267,
                        56.972794
                     ],
                     [
                        24.121791,
                        56.9733
                     ],
                     [
                        24.121745,
                        56.973326
                     ]
                  ]
               ]
            },
            "properties":{
               "name":"01000242161",
               "iso_code":"LVA"
            }
         }
      ]
   }
}

Cadastral (parcel) reverse geocoding

Returns parcel number and extra properties for the given coordinates (location information).

API URL

The request URL should match the following pattern:

https://api.kartes.lv/v3//reverse_geocoding?type=cadastral

By default, the response is given in JSON (JSONP and XML are also available).

The HTTP GET request method is used.

Query parameters

The request consists of the following GET parameters:

Parameter Description Possible values
x x-coordinate in the TM Baltic93 CRS (EPSG:25884).
y y-coordinate in the TM Baltic93 CRS (EPSG:25884).
lat Latitude coordinate in the WGS-84 projection (EPSG:4326)
lon Longitude coordinate in the WGS-84 projection (EPSG:4326)
type cadastral
result_data_type Output format. JSON is the default option.
  • json
  • jsonp
  • xml
callback Use it if you use result_data_type=jsonp.

Response parameter

The response consists of a single element. It has following parameters:

Parameter Description
code Parcel number.
ownership_status Ownership status of the parcel number.

Examples

Input:

https://api.kartes.lv/v3//reverse_geocoding?lat=56.952327646236431&lon=23.90430271953273&type=cadastral

Output:

{
    "code":"80480030366",
    "ownership_status":"Juridiska persona"
}