Bug report #10671

first WMTS layer does NOT choose the right resolution

Added by Richard Duivenvoorde about 6 years ago. Updated over 1 year ago.

Category:Web Services clients/WMS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:19070


If I add a wmts layer to an empty project, it is always blurry (with or without tilescale).

test eg in python console:

iface.addRasterLayer("tileMatrixSet=EPSG:28992&crs=EPSG:28992&layers=brtachtergrondkaart&styles=&format=image/png&url=http://geodata.nationaalgeoregister.nl/wmts?VERSION%3D1.0.0%26request%3DGetCapabilities","wmts master example","wms")

selecting that layer the and the following python show the resolutions:

[0.21, 0.42, 0.84, 1.68, 3.36, 6.72, 13.44, 26.88, 53.76, 107.52, 215.04, 430.08, 860.16, 1720.32, 3440.64]

looking into the code at:


it looks like the provider is searching for the best fit resolution, but it's not clear to me why that does not succeed.

IF I have to choose between fitting the max extent in the window OR having maybe a little cut off extent but in a sharp resolution, I would go for the latter case.

I would be great that if you add a wmts (often an opaque reference layer) as first layer that it is in the right resolution. Also because after that it will never reach the 'sharp' looking resolutions anymore (inless you fiddle with the tile scale etc).

(I tried to debug, but I loose track in the logic of that part (vres pres?) that part)


#1 Updated by Nyall Dawson about 6 years ago

I can confirm this - steps to reproduce:

1. add the WMTS with url http://api.maps.vic.gov.au/geowebcacheWM/service/wms?version=1.1.1&tiled=true
2. choose the "web mercator" layer
3. add the layer to a map
4. right click the layer and select "zoom to best scale" - scale chosen results in blocky, resampled map

#2 Updated by Giovanni Manghi over 3 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Giovanni Manghi over 1 year ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF