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:
  • wms.kartes.lv
  • wms1.kartes.lv
  • wms2.kartes.lv
  • wms3.kartes.lv
  • wms4.kartes.lv
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:
  • wgs - the Web Mercator projection (EPSG:3857).
  • lks - the LKS-92 projection (EPSG:3059)
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
| | request | Type of the request. |
  • GetMap - retrieves a map (an image)
  • GetCapabilities - retrieves metadata about the operations, services, and data (an XML file)
| The following parameters are only available for GetMap requests for WMS version 1.1.1.

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:
  • xMin - x-coordinate of the bottom-left point,
  • yMin - y-coordinate of the bottom-left point.
  • xMax - x-coordinate of the top-right point.
  • yMax - y-coordinate of the top-right point.
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:

  1. 6007.4787274574555
  2. 3003.7393637287278
  3. 1501.8695495724326
  4. 750.93477478621628
  5. 375.46751968503941
  6. 187.73362755058844
  7. 93.86694606722547
  8. 46.933473033612735
  9. 23.4667365168063
  10. 11.733235966471934
  11. 5.8666179832359671
  12. 2.9334412835492341
  13. 1.4665883498433665
  14. 0.73342646685293378
  15. 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.

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:

Colour map example

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:

Colour map example

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:

Greyscale map example

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:

Cadastral layer example

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.
  • wms.kartes.lv
  • wms1.kartes.lv
  • wms2.kartes.lv
  • wms3.kartes.lv
  • wms4.kartes.lv
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:

WTMS example