Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first WMTS layer does NOT choose the right resolution #19070

Closed
qgib opened this issue Jun 22, 2014 · 3 comments
Closed

first WMTS layer does NOT choose the right resolution #19070

qgib opened this issue Jun 22, 2014 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@qgib
Copy link
Contributor

qgib commented Jun 22, 2014

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 10671
Affected QGIS version: master
Redmine category:web_services_clients/wms


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:

iface.mapCanvas().currentLayer().dataProvider().property("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:

https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp#L576

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)

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2014

Author Name: Nyall Dawson (@nyalldawson)


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

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • resolution was changed from to end of life
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Mar 9, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant