4

My question is as follows:

I've added a WMS layer into QGIS but when it then goes to display the map and display the tiles, the request is different to what it should be. Is it possible within the layer properties to "force" certain values?


Background (but this would be valid on other sources) :

I want to add the layers found here: https://www.walkhighlands.co.uk/maps/map2_32fw.shtml

Using Firefox "Inspect Element" I can see the tile requests are of the form:

https://walkhighlands.uk/geoserver/gwc/service/wms?KEY=&URL=https://walkhighlands.uk&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image/png&LAYERS=osgb:50k&SRS=EPSG:27700&BBOX=209000,757000,210000,758000&WIDTH=200&HEIGHT=200

I Add a new WMS source into QGIS with:

https://walkhighlands.uk/geoserver/gwc/service/wms?KEY=&URL=https://walkhighlands.uk&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

And it picks out the seven available layers. If I then drag and drop the "25k" layer to the layer panel and look at the log, the requests (and server response) are like so:

2018-02-22T10:53:41 1   Map request failed [error:Error downloading https://walkhighlands.uk/geoserver/gwc/service/wms?KEY=&URL=https://walkhighlands.uk&&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=0,0,660000,1230000&SRS=EPSG:27700&WIDTH=120&HEIGHT=120&LAYERS=osgb:25k&STYLES=&FORMAT=image/png&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE - server replied: Bad Request

If I cut and paste this into a browser I get:

400: Requested horizontal resolution: 3300.0 , best match: 2500.0 exceeds 10% threshold. Perhaps the client is configured with an incorrect set of scales (resolutions), or the DPI setting is off compared to the one in GWC ?

So QGIS seems to be sending the wrong parameters (tile sizes should be 200x200, I tried setting this (to 200) in the Layer. Add Layer. Add Layer(s) from a WM(T)S Server but it produces this above.

Is there a way to intervene in the QGIS tile requests?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.