Le mercredi 09 mars 2016 09:22:57, Thomas Colley a écrit : > Hi > > I mistakenly posted this to developer list instead of user yesterday, hope > it's ok to post here too. > > I am trying to troubleshoot a problem we're having with a WFS service in > QGIS 2.14. I am loading in a layer with 'Only request features overlapping > the current view extent' and have tried cached and uncached. The layer > loads only 1 feature and that is not within the map canvas. I have used > Wireshark to capture the requests and can see that QGIS is making the > GetFeature request with no bbox parameter and a maxfeatures parameter set > to 1. > > In QGIS 2.12.2 the GetFeature request with no bbox and maxfeatures=1 is > still made but then it is followed up with another GetFeature request with > the correct bbox and all features are loaded onto the layer as expected. I > am wondering if the maxfeatures=1 request is a probe to test that valid > features are being returned before making the proper request but in 2.14 > the proper request never gets sent. Looking at the layer metadata in QGIS > the layer source shows the correct request URL. > > It's confusing as we have other WFS services which are working fine in > 2.14. If I can narrow the issue down to being a problem with the service > itself I can approach the supplier.
The request with maxfeatures=1 is done when the response to the DescribeFeatureType request couldn't determine if the geometry type is point, line or polygon. So it downloads a single feature and use its geometry type as the layer type. So I guess there's a logic problem in the code in that probably rarely used code path. Did you try doing a zoom in or zoom out or pan operation ? This might perhaps help triggering a new request (not sure though) > > It's a commercial WFS but if anyone is able to test I can provide the > connection URL. I'm currently doing a major overhaul of the WFS provider ( https://github.com/qgis/QGIS-Enhancement-Proposals/issues/53 ) . That would be good if I could test your use case at some point. But not before a few weeks as the code isn't ready yet. > > Below are details of the packets being sent from QGIS. > > Thanks very much > > Tom > > WFS connection string: > http://www.getmapping.com/web.feature.service/FeatureService.svc/xxxx/xxxxx > /mastermap? > > Layer source from Layer Properties > Metadata tab > Properties > http://www.getmapping.com/web.feature.service/FeatureService.svc/xxxx/xxxxx > /mastermap?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=topographi > carea&SRSNAME=EPSG:27700&BBOX=274257.18611745559610426,195451.6365115281660 > 1098,274325.73425826861057431,195546.70830481656594202 > > Requests sent when adding WFS layer (caught by Wireshark): > http://www.getmapping.com/web.feature.service/FeatureService.svc/xxxx/xxxxx > /mastermap?SERVICE=WFS&VERSION=1.0.0&TYPENAME=topographicarea&BBOX=274257.1 > 8611745559610426,195451.63651152816601098,274325.73425826861057431,195546.7 > 0830481656594202&REQUEST=DescribeFeatureType > > http://www.getmapping.com/web.feature.service/FeatureService.svc/xxxx/xxxxx > /mastermap?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=topographi > carea&SRSNAME=EPSG:27700&&MAXFEATURES=1 > > http://www.getmapping.com/web.feature.service/FeatureService.svc/xxxx/xxxxx > /mastermap?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities&TYPENAME=topog > raphicarea&SRSNAME=EPSG:27700&BBOX=274257.18611745559610426,195451.63651152 > 816601098,274325.73425826861057431,195546.70830481656594202 -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ Qgis-user mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
