Hi Pedro,

Thanks for the answer, it worked.

I guess my question now is, why do we have a cache on the GetCapabilities 
request? I guess some WMS servers provide a rather large response and the fast 
lookup in a (how old?) cache is preferred in many situations – at least when 
you know the capabilities haven’t changed.

But I don’t think this is user friendly at all. If I clear the cache, I get a 
new capabilities response which works. But I have to know, that it is the 
Settings/Options/Network/Cache Settings I have to clear (which doesn’t specify 
that it will clear the WMS capabilities and the user don’t know that it is 
cached). Wouldn’t it be better with a clear cache option for the given WMS 
server selection? This way the user can clear the cache if something doesn’t 
work or a newly published layer is missing, and the user can do it where the 
problem is occurred.

Regards, Casper


From: Pedro Venâncio [mailto:[email protected]]
Sent: 15. februar 2016 10:39
To: Casper Børgesen (CABO)
Cc: [email protected]
Subject: Re: [Qgis-developer] WMS provider: Cannot calculate extent

Hi Casper,
Just clean the WMS cache on QGIS: Settings -> Options -> Network -> Cache 
settings -> clear
Best regards,
Pedro Venâncio


2016-02-15 9:14 GMT+00:00 Casper Børgesen (CABO) 
<[email protected]<mailto:[email protected]>>:
I have a strange situation. I host two different WMS layers on an internal 
GeoServer 2.8.2 (type is ImagePyramid) and both layers look fine when 
previewing them in the GeoServer Layer Preview. I use QGIS Master x64 (latest 
nightly build from OSGeo4w) to access the layers.
One of them gets added to the map the other one doesn’t and give me the 
following message:

WMS provider: Cannot calculate extent
(..\..\..\..\..\..\src\providers\wms\qgswmsprovider.cpp : 148 : 
QgsWmsProvider::QgsWmsProvider)
Raster layer: Provider is not valid (provider: wms, URI: 
contextualWMSLegend=0&crs=EPSG:25832&dpiMode=7&featureCount=10&format=image/png&layers=myns:layer_not_working&styles=&url=http://myserver:8080/geoserver/wms
(..\..\..\..\..\src\core\raster\qgsrasterlayer.cpp : 668 : 
QgsRasterLayer::setDataProvider)

By sniffing the GetCapabilities request sent by QGIS using Fiddler, I get the 
following two layer definitions in return:

Working layer:
    <Layer queryable="1" opaque="0">
        <Name>myns:layer_working</Name>
        <Title>Layer working</Title>
        <Abstract/>
        <KeywordList>
          <Keyword>WCS</Keyword>
          <Keyword>ImagePyramid</Keyword>
          <Keyword>layer_a</Keyword>
        </KeywordList>
        <CRS>EPSG:25832</CRS>
        <CRS>CRS:84</CRS>
        <EX_GeographicBoundingBox>
          <westBoundLongitude>11.220126802325543</westBoundLongitude>
          <eastBoundLongitude>11.893382022184314</eastBoundLongitude>
          <southBoundLatitude>55.552736929684166</southBoundLatitude>
          <northBoundLatitude>56.104558130983634</northBoundLatitude>
        </EX_GeographicBoundingBox>
        <BoundingBox CRS="CRS:84"
                                     minx="11.220126802325543"
                                     miny="55.552736929684166"
                                     maxx="11.893382022184314"
                                     maxy="56.104558130983634"/>
        <BoundingBox CRS="EPSG:25832"
                                     minx="639998.4"
                                     miny="6159999.9999999665"
                                     maxx="680001.6"
                                     maxy="6219999.999999972"/>
        <Style>
          <Name>raster</Name>
          <Title>Default Raster</Title>
          <Abstract>A sample style that draws a raster, good for displaying 
imagery</Abstract>
          <LegendURL width="20" height="20">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:type="simple" 
xlink:href="http://myserver:8080/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=myns%layer_working<http://myserver:8080/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=myns%25layer_working>"/>
          </LegendURL>
        </Style>
      </Layer>

Layer not working:
      <Layer queryable="1" opaque="0">
        <Name>myns:Layer_not_working</Name>
        <Title>Layer not working</Title>
        <Abstract/>
        <KeywordList>
          <Keyword>WCS</Keyword>
          <Keyword>ImagePyramid</Keyword>
          <Keyword>layer_b</Keyword>
        </KeywordList>
        <CRS>EPSG:25832</CRS>
        <CRS>CRS:84</CRS>
        <EX_GeographicBoundingBox>
          <westBoundLongitude>10.582520521148165</westBoundLongitude>
          <eastBoundLongitude>12.236951289179972</eastBoundLongitude>
          <southBoundLatitude>55.45523075908682</southBoundLatitude>
          <northBoundLatitude>56.38403418056449</northBoundLatitude>
        </EX_GeographicBoundingBox>
        <BoundingBox CRS="CRS:84"
                                     minx="10.582520521148165"
                                     miny="55.45523075908682"
                                     maxx="12.236951289179972"
                                     maxy="56.38403418056449"/>
        <BoundingBox CRS="EPSG:25832"
                                     minx="600000.00000002"
                                     miny="6149999.999999966"
                                     maxx="700000.0000000303"
                                     maxy="6249999.999999976"/>
        <Style>
          <Name>raster</Name>
          <Title>Default Raster</Title>
          <Abstract>A sample style that draws a raster, good for displaying 
imagery</Abstract>
          <LegendURL width="20" height="20">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:type="simple" 
xlink:href="http://myserver:8080/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=myns%layer_not_working<http://myserver:8080/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=myns%25layer_not_working>"/>
          </LegendURL>
        </Style>
      </Layer>

I have anonymized the messages above (since the error doesn’t point in the 
direction of naming) and I can of course provide more information if needed.

Regards, Casper

_______________________________________________
Qgis-developer mailing list
[email protected]<mailto:[email protected]>
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to