1

I can view the tiles provided by a WMS service using QGIS. I add this: https://resource.sgu.se/service/wms/130/jorddjupsmodell URL as a WMS layer, I get this view:

enter image description here

(More info on URL source: here)

Inspecting the source of some websites, I can discover URLs pointing to single tiles. Ie if I go to this link in my browser:

https://opencache.statkart.no/gatekeeper/gk/gk.open_nib_web_mercator_wmts_v2?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=Nibcache_web_mercator_v2&STYLE=default&FORMAT=image/jpgpng&TILEMATRIXSET=default028mm&TILEMATRIX=17&TILEROW=38688&TILECOL=69278

I get this image:

enter image description here

How can I know what URL points to a specific tile, if I have only the URL for the WMS service, as in the above case? I believe this is the same question as asking what requests QGIS sends exactly to the WMS server, to get a specific tile.

I would like to have a URL which I can paste in my browser and get a tile for a specific zoom level, row and column (= do what QGIS does, retrieve a specific tile), something like:

https://resource.sgu.se/service/wms/130/jorddjupsmodell?something1{z}something2{x}something3{y}

I am looking for something1, something2, something3.

2
  • 2
    WMS doesn't support tile schematas - that's what the WMTS or TMS protocols are for. The example URL you posted states its protocol to be WMTS. WMS pulls image data by bounding box URL parameters.
    – geozelot
    Commented Jun 16, 2022 at 14:56
  • So the URL I am looking for does not exist, is that correct?
    – zabop
    Commented Jun 16, 2022 at 15:02

1 Answer 1

3

A WMS has no concept of tiling or zoom levels. A client such as QGIS/OpenLayers can spoof tiling, by splitting up the area of interest and sending multiple GetMap requests. This can sometimes cause issues (repeated labelling for example) because a WMS server doesn't maintain session state (every request is regarded as separate from a previous one).

A map image is fetched using a GetMap request, you need to specify height and width in pixels, a bounding box (BBOX), in minx,miny,maxx,maxy order where for the latest version 1.3.0 x is the first listed axis and y the second according to the official coordinate reference system (see for example epsg.org for EPSG codes) as specified in the CRS. You need to specify one or more LAYERS and the output format and a style per layer styles.

For QGIS you specify the endpoint of the service.

Something like: https://ogc.xxx.ac.uk/cgi-bin/BGS_BGS-HPA_Radon_Potential/ows?

QGIS will make a GetCapabilities request to determine layer and style names, supported CRS, data extents, etc and presents that to the user in a readable format.

A user then adds the layer they want, selects the style and QGIS works out the rest of the information according to the map view

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.