Bug report #10196

not able to display certain WMS services in other coordinate system as WGS84 (QGIS Dufour 2.2.0 -1)

Added by Lars Scharfenberg almost 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Web Services clients/WMS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:18646

Description

I'm having problems loading certain WMS layers into the canvas in version 2.2.0. I've tried to revert to version 2.0.1 today, and in this version the error described here doesn't occur. It only happens with certain services, and only when changing the coordinate system, although the particular coordinate system should be supported (default when loading is EPSG:4326/WGS 84, I choose EPSG:31426/ DHDN Gauß-Krüger Zone 4). Steps to reproduce the error:
1. Load WMS layer with the "Add WMS/WFS Layer" button
2. connect to service, leave coordinate system on WGS84
3. use 'On the fly' CRS transformation to set different coordinate system (in this case EPSG:31426)
The same happens when I choose the coordinate system I want to transform to in the "Add WMS/WFS"-service window.

The following message pops up in the lower right of the QGIS window (when clicking the little exclamation mark icon):
Map request error (Title:Service Exception; Error:(No error code was reported)
The WMS vendor also reported:
msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH and HEIGHT must be between 1 and 2048 pixels.
; URL: http://www.bgr.de/service/geologie/guek200/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=49.79986260598150238,11.26827235151196582,50.35757374880198256,12.90148880022445255&CRS=EPSG:4326&WIDTH=2247&HEIGHT=767&LAYERS=GUEK200_300&STYLES=default&FORMAT=image/gif&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE)

The service used is the GUEK200 (Geologische Übersichtskarte 1:200.000) provided by the BGR. It can be found here:
http://www.bgr.de/Service/geologie/

DxDiag.txt Magnifier - DxDiag, supplies system specs (32.3 KB) Lars Scharfenberg, 2014-05-07 02:49 AM

2014-05-07_16_24_39-Greenshot.jpg - screenshot 2.0.1-3 x86 (2.7 MB) Lars Scharfenberg, 2014-05-07 07:27 AM

History

#1 Updated by Jukka Rahkonen almost 10 years ago

The error message reveals that the WMS server is MapServer which is using the default maximum value of 2048 pixels for the size of the output image. Values which are used in the request are WIDTH=2247&HEIGHT=767.
If your screen is really so wide (dual screen?) this is not an error at all. Make the map narrower, the WIDTH parameter will decrease and you will see a map. However, if your map canvas in is not 2247 pixel wide but QGIS for some reason is using that value in the GetMap request, then it is a bug.

#2 Updated by Lars Scharfenberg almost 10 years ago

In version 2.0.1 -3 it doesn't occur. My screen resolution is 1920*1080 (and the map view doesn't take the whole screen), I display it on a single screen (although I have two screens connected, but mostly I don't stretch QGIS over two screens), so I must still be below the limit of 2048 pixels you've mentioned.
Is there some way to manually check the width of the map? Attached you find a screenshot from 2.0.1 -3 (I've uninstalled 2.2 to get rid of this error for the moment), I can also make one of 2.2.
Another hint: I'm using the x86 version (because I saw some reports that the x64 ones are still a bit buggy).

#3 Updated by Giovanni Manghi almost 10 years ago

  • Tag changed from WMS, QGIS Dufour to WMS
  • Affected QGIS version changed from 2.2.0 to master
  • Operating System deleted (Windows 7 64bit SP1)
  • Target version changed from Version 2.2 to Version 2.4
  • Priority changed from Normal to Severe/Regression

I can confirm the issue:

on QGIS 2.2/master when adding one of the layers of the above mentioned server, choosing 31468 as CRS of the layer (DHDN Gauß-Krüger Zone 4 is 31468, not 31426 as in the description) then the layer does not show.

On the other hand on QGIS 2.1 there is no such issue.

This happen for some of the available CRSs for the layers, but not all.

(because I saw some reports that the x64 ones are still a bit buggy).

false, it is truth the exact contrary... anyway this does not seems a factor in this issue.

#4 Updated by Jürgen Fischer almost 10 years ago

  • Status changed from Open to Closed
  • Resolution set to invalid

That's a reprojection issue.

The getmap request has to be done in the coordinates of the WMS layer. In WGS:84 the canvas extent is rotated a bit and therefore the rectangular request must be extended to fully cover the original extent, in the process the pixel extent of the request is also increased proportionally and in this case exceeds the limits of the WMS server.

Unfortunately WMS servers don't advertise these limits, but in QGIS you can manually set a tile size and then it splits requests into smaller ones.

#5 Updated by Lars Scharfenberg almost 10 years ago

@Jürgen Fischer: Could you point me to instructions on how to change WMS tile size through the QGIS interface? Haven't found that GUI option yet.

#6 Updated by Jürgen Fischer almost 10 years ago

Lars Scharfenberg wrote:

@Jürgen Fischer: Could you point me to instructions on how to change WMS tile size through the QGIS interface? Haven't found that GUI option yet.

Just fill out the two fields behind Tile size in the Options group box on the Layers tab.

#7 Updated by Lars Scharfenberg almost 10 years ago

OK, I can confirm that it's possible in version 2.2.0 to display the WMS mentioned above in 31468 (DHDN-Gauß-Krüger-Zone 4) in full extent (right-click "zoom to layer extent" in layer browser on the left) when setting the tile size lower than 2048*2048.
However it takes extremely long to load tiles (the screen just stays blank) when zooming in. QGIS often freezes when I try it, doesn't respond to user input any more when zooming in. So I can't get a zoomed in view. QGIS doesn't show error messages though.
I've loaded the WMS over the "Add WMS/WCS"-Layer button, then set the tile sizes mentioned below in the dialogue, and set the CRS to 31468 (DHDN GK Zone 4).
In version 2.0.1 it still works better.
I've tried two tile sizes so far, 1024*1024, 2048*2048 and 202*196. What's the default tile size QGIS should choose for a WMS when you don't enter values into the tile width/tile height-fields?
Could someone try this to see if it also occurs on other PCs?

#8 Updated by Giovanni Manghi almost 10 years ago

Lars Scharfenberg wrote:

OK, I can confirm that it's possible in version 2.2.0 to display the WMS mentioned above in 31468 (DHDN-Gauß-Krüger-Zone 4) in full extent (right-click "zoom to layer extent" in layer browser on the left) when setting the tile size lower than 2048*2048.
However it takes extremely long to load tiles (the screen just stays blank) when zooming in. QGIS often freezes when I try it, doesn't respond to user input any more when zooming in. So I can't get a zoomed in view. QGIS doesn't show error messages though.
I've loaded the WMS over the "Add WMS/WCS"-Layer button, then set the tile sizes mentioned below in the dialogue, and set the CRS to 31468 (DHDN GK Zone 4).
In version 2.0.1 it still works better.
I've tried two tile sizes so far, 1024*1024, 2048*2048 and 202*196. What's the default tile size QGIS should choose for a WMS when you don't enter values into the tile width/tile height-fields?
Could someone try this to see if it also occurs on other PCs?

try a smaller size, like 256x256 it works ok (at least here does).

#9 Updated by Lars Scharfenberg almost 10 years ago

OK, it only works by setting 256*256, and by setting the coordinate system to WGS84 when adding the WMS, and then setting 31468 by CRS transformation (lower right side of the QGIS window).

Also available in: Atom PDF