Bug report #13762

Error accessing external WMS server -- WMS provider: Cannot calculate extent

Added by Mario FF over 8 years ago. Updated over 6 years ago.

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

Description

When adding any layer from "http://www.madrid.org/cartografia/ide/wms/WMS_MAPAS_TOPOGRAFICOS.xml" to QGIS, the following error is shown (in spanish):
WMS provider: No se puede calcular la extensión
Raster layer: El proveedor no es válido (proveedor: wms, URL: contextualWMSLegend=0&crs=EPSG:4230&dpiMode=7&featureCount=10&format=image/jpeg&layers=MADRID_38000_2008_2&styles=&url=http://www.madrid.org/cartografia/ide/wms/WMS_MAPAS_TOPOGRAFICOS.xml)

It has been happening in the last versions of QGIS


Related issues

Related to QGIS Application - Bug report #14589: GetCapabilities gets cached in a confusing way (even when... Closed 2016-03-29
Related to QGIS Application - Bug report #13294: WMS extent/coordinates wrong on Windows Closed 2015-08-31

Associated revisions

Revision 1ec7ad56
Added by Even Rouault almost 8 years ago

[WMS provider] Tolerate GetCapabilities response with several top-level layers

Fix #13762

Also, in case there's a single layer advertized, show it in the browser.

History

#1 Updated by Giovanni Manghi over 8 years ago

  • Category set to Web Services clients/WMS
  • Priority changed from Normal to Severe/Regression
  • Target version set to Future Release - High Priority
  • Affected QGIS version changed from 2.12.0 to master

I confirm the issue, also on master. This was not an issue on 1.8.

#2 Updated by Martin Dobias over 8 years ago

  • Assignee set to Martin Dobias

#3 Updated by Martin Dobias about 8 years ago

  • Assignee deleted (Martin Dobias)

This is an interesting case... normally WMS servers have one top-level layer, which then contains a bunch of sub-layers. In this case there are multiple top-level layers. Parsing of WMS capabilities in QGIS is a bit messy, so while in some places this is accepted, in others (like calculation of extent) it does not work.

The question is whether this is allowed by WMS: in 1.3.0 the XML schema says there is just one top-level layers, in 1.1.1 I am unable to find a statement for or against it (there is no XML schema, just DTD which does not provide such information). The backend server is ERDAS APOLLO. Maybe in this case of multiple top-level layers we could just patch the XML to have one empty top-level layer so that the rest of the code can make the usual assumptions.

#4 Updated by Raul Nanclares about 8 years ago

I just found this bug using geoserver, apparently it only affects version 2.14. Same WMS is working completely fine with 2.8 and 2.12. This WMS has many top-level raster layers but it's only happening on some of the layers not all. http://geo.guadalajara.gob.mx:8080/geoserver/gdlsig/wms?

Something that's even weirder the WMTS is working flawlessly.

#5 Updated by Giovanni Manghi about 8 years ago

see also #14589

#6 Updated by Richard Duivenvoorde almost 8 years ago

I'm experiencing this behaviour here also with an older Geoserver version. BUT with normal capabilities.

When I have added a new layer, I get this error. Then sometimes after restarting QGIS, it will load, and after removing or restarting it will not load again...

I also did some fiddling with the cache-directory (which is not being saved with me by the way, see #14990)

When I set the cache directory I can add the layer, and KEEP being able to add it.

#7 Updated by Richard Duivenvoorde almost 8 years ago

Ok, definitly has something to do with the caching directory.

Adding a fresh layer in (already known) geoserver and trying to load the layer in QGIS I get the error.

BUT when I change the cache-directory in the settings to a fresh dir (like /tmp/foo) THEN QGIS just loads the layer...

#8 Updated by Richard Duivenvoorde almost 8 years ago

Maybe bring back the button 'clean cache'? back again would be helpfull in these cases (if impossible to fix otherways)

#9 Updated by Even Rouault almost 8 years ago

  • Status changed from Open to Closed

#10 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Closed to Reopened

#11 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Reopened to Closed
  • Resolution set to not reproducable

This seems now ok on both 2.18.4 and master.

#12 Updated by Adam Szieberth over 6 years ago

Giovanni Manghi wrote:

This seems now ok on both 2.18.4 and master.

Still not fixed in 2.18.6. I had to manually clear cache/data7.

#13 Updated by Giovanni Manghi over 6 years ago

  • Description updated (diff)
  • Priority changed from Severe/Regression to Low

Adam Szieberth wrote:

Giovanni Manghi wrote:

This seems now ok on both 2.18.4 and master.

Still not fixed in 2.18.6. I had to manually clear cache/data7.

try with 2.18.13, thanks.

Also available in: Atom PDF