Bug report #6941

Updated by Giovanni Manghi over 4 years ago

After some deliberation and investigation, I think this is a QGIS bug rather than GeoServer.

I have a WMS 1.3.0 layer being served by a GeoServer 2.2.2 install.

I start with a blank project and add a layer (this is so QGIS doesn't automatically pan to the WMS). I then make sure I am looking *away* from whereever the WMS layer will be added.

I then add the WMS layer.

At this point, QGIS locks up for about 30 seconds using 100% of the CPU.

Looking at the Geoserver logs, it seems that QGIS has made a request to the WMS and GeoServer is trying to serve it. The delay is GeoServer rendering a map with ~50,000 elements.

The bug is: the WMS can't possibly on the screen when I add it, the bounding boxes don't merge.

I'm viewing:

bottom left: 409355,378801

top right: 420152,384476

The bounding box of the layer as declared in GeoServer (and the GetCapabilities) is:


<BoundingBox CRS="EPSG:27700" minx="265000.0" miny="270000.0" maxx="285000.0" maxy="385000.0"/>


The request QGIS has made to geoserver is:


2013-01-03 17:37:08,553 DEBUG [org.geotools.jdbc] - Setting parameter 1 as MDSYS.SDO_GEOMETRY(2003,27700,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(260137.473441875,262244.437679375,289324.518804125,392778.766678625))


Because the layer extent is declared in the GetCapabilities, QGIS should know not to request a map, let alone one of the entire area. ArcGIS doesn't make a request in these circumstances.


This even happens if I do it the other way - super zoomed in.

I'm viewing:

Bottom left: 278510,378502

Top Right: 278676,378568

Which is an area about 1.5hectares - zoomed to 1:380. This does include a small portion of the WMS area < 1%.

But QGIS is doing the exact same thing (or is inducing GeoServer to), requesting:




As you can see, its identical to the first bounding box requested when off the map. When I run this through Oracle its actually selecting every single feature!

This may be GeoServer, but as it doesn't happen with ArcGIS I'm inclined to suspect its QGIS.

I've attached the entire relevant part of the GeoServer logs. All of that happens between clicking "add" and the layer being added for the second example above.