Raster maps
WMS
Multiple raster map services in the WMS and WMTS formats are provided. We provide Baltic-wide color and greyscale original maps based on our own geospatial data, as well as an orthophoto map and a transparent cadastral information layer for Latvia. The general WMS properties are described at the beginning at this section, meanwhile a more specific description, regarding each WMS, is at the end of the document.
API URL
The request URL should match the following pattern:
https://wms<link_number>.kartes.lv//<projection>/<service_key>/?
The response type depends on the request parameter. If it is a GetMap request, an image will be retrieved, if it is a GetCapabilities request, an XML file will be retrieved.
Query parameters
The API is made following the OGC WMS standard. However, some parameters are not supported. It works with the most popular interactive map libraries (Leaflet, OpenLayers etc) and desktop apps (such as QGIS, ArcMap and ArcGIS Pro). Additionally, the specific map should be defined by the service key parameter.
Parameter | Description | Possible values |
---|---|---|
link_number | Subdomain value (used sequentially to help with browser parallel requests per domain limitation). Leaflet and OpenLayers support usage of this parameter. If this parameter is omitted, the map can load slower. | Such subdomains are available:
|
client_key | Your authorisation key. | |
projection | The CRS of the WMS. Each URL defines a specific WMS in a specific CRS. | For now, two CRS are available:
|
service_key | The service key defines the map type. Colour, greyscale basemaps are available, as well as, as orthophoto map and topographic map. Each CRS has a different service key, some map types are available only at a specific CRS. | 15 - colour map (Jāņa sēta); 15bw - greyscale map (Jāņa sēta); orto - orthophoto (LGIA); topo - topographic map of Latvia (scale 1: 50 000; LGIA); cadastral - transparent cadastral information layer (parcel & building information) (VZD). Available only in WGS coordinates. |
LGIA - The Latvian Geospatial Information Agency
VZD - Latvian State Land Service
Standard WMS parameters
Only necessary WMS parameters to make GetMap and GetCapabilities requests are described. are described | Parameter | Description | Possible values| |--------------------| | service | Type of the service. | WMS | | version | WMS version. |
- 1.0.0
- 1.1.0
- 1.1.1
- 1.3.0
- GetMap - retrieves a map (an image)
- GetCapabilities - retrieves metadata about the operations, services, and data (an XML file)
Parameter | Description | Possible values |
---|---|---|
format | Image format. | image/png |
srs | EPSG code of the CRS. | |
bbox | Bounding box. | xMin, yMin, xMax, yMax. If you are using WMS 1.3.0, there are following differences:
|
width | Width of the image (pixels). | |
height | Height of the image (pixels). |
Additonal parameters for WMS in the LKS projection
To implement WMS services using the most popular libraries (as Leaflet, OpenLayers) properly, additonal information is neccesary. The best quality for specific zoom level is at these specific resolutions:
- 6007.4787274574555
- 3003.7393637287278
- 1501.8695495724326
- 750.93477478621628
- 375.46751968503941
- 187.73362755058844
- 93.86694606722547
- 46.933473033612735
- 23.4667365168063
- 11.733235966471934
- 5.8666179832359671
- 2.9334412835492341
- 1.4665883498433665
- 0.73342646685293378
- 0.36671323342646689
For example, to define the WMS layer using the OpenLayers library, it's necessary to define the resolutions. In the case of LKS CRS, the above-mentioned resolutions must be defined. Additonally, the tile origin parameter is neccesary for using this WMS layer in the OpenLayers. For the LKS projection, the tile origin value is -5682840.1444699997, 4997050.3242600001.
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://wms2.kartes.lv//wgs/15/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A3857&BBOX=2504688.5456319,7514065.6313279,2817774.6134879,7827151.6991839&WIDTH=256&HEIGHT=256
Response:
Input:
https://wms2.kartes.lv//wgs/15/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&SRS=EPSG%3A900913&BBOX=2191602.4777759,7514065.6313279,2817774.6134879,8140237.7670399&WIDTH=512&HEIGHT=512
Response:
Input:
https://wms1.kartes.lv//lks/15bw/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A3059&BBOX=468817.53057868,191067.76562822,661056.83292396,383307.06797349&WIDTH=256&HEIGHT=256
Response:
Input:
https://wms1.kartes.lv//wgs/cadastral/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&STYLES=&BBOX=2737057.1094378084%2C7756218.134887848%2C2738280.1018904033%2C7757441.127340443
Response:
WMTS
API URL
For the getCapabilities request, use the following URL pattern:
https://wms.kartes.lv//wgs/WMTS/?request=getcapabilities
At the ResourceURL element, you can find information regarding WMS tiles request format:
https://wms<link_number>.kartes.lv//wgs/15/<zoom>/<y>/<x>.png
Query parameters
Parameter | Description | Possibles values |
---|---|---|
link_number | Subdomain. Used sequentially to help with browser parallel requests per domain limitation. |
|
client_key | Your authorisation key. | |
zoom | Zoom level. | |
y | The y-coordinate of the tile. | |
x | The x-coordinate of the tile. |
Examples
Input:
https://wms4.kartes.lv//wgs/15/12/2336/1251.png
Response: