Bug report #14876

WFS client broken in QGIS master

Added by Giovanni Manghi almost 3 years ago. Updated almost 3 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Even Rouault
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No

Description

I'm testing the WFS client on QGIS master on Windows, using a sample WFS Server made with QGIS Server 2.14.3 on Linux (and the hello world sample project, the one that is/was shipped with qgis web client).

Using the WFS client in QGIS 2.8 or 2.14 there are no issues.

Using the WFS client in master I get:

  • upon establishing the connection in the log: QNetworkDiskCache::prepare() unable to open temporary file
  • after adding a layer in the log: QNetworkDiskCache::prepare() unable to open temporary file
  • the added layer do not show in the canvas, or better it just show at certain scales and only if the project already contains something. If the wfs layer is the first I'm not able to see it in any way.
  • the table of attributes is completely empty
  • the checkbox "only request features overlapping..." does not seems to have any effect.

wfs.png (8.52 KB) Giovanni Manghi, 2016-05-24 04:44 AM


Related issues

Related to QGIS Application - Bug report #4604: WFS option "Only request features overlapping the current... Closed 2011-12-04

Associated revisions

Revision 31879e52
Added by Even Rouault almost 3 years ago

[WFS provider] Fix handling of LatLongBoundingBox in WFS 1.0

According to the specification, the values of LatLongBoundingBox
are supposed to be in the SRS, not necessarily in WGS84.

But some servers do not follow the spec and return values in WGS84,
so let's try to accomodate for this too.

Fix #14876

History

#1 Updated by Giovanni Manghi almost 3 years ago

  • Target version set to Version 2.16

#2 Updated by Even Rouault almost 3 years ago

  • Assignee set to Even Rouault

Does it happen only with this WFS server ? What about if you try with another server like http://kartenn.region-bretagne.fr/geoserver/wfs ?
What about if you try WMS requests instead (the QNetworkDiskCache issue would sound more like a general network issue than a WFS specific one) ? What about if you play with Settings / Options / Network / Cache settings / Directory ?

#3 Updated by Giovanni Manghi almost 3 years ago

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

you are right, setting the right properties makes things work, unfortunately the real regression here seems to be #14514

Anyway, after setting the proper cache settings it almost works as expected.

I noticed that now the when adding a wfs layer (from qgis server) as first layer the qgis canvas extent is not automatically set to the layer extent. The mouse wheel do not work, "zooom full" also do not work as well "zoom to layer", leaving as only option to use the zoom out tool.

Not sure if this a client or server issue. Please let me know if I have to file a new ticket.

#4 Updated by Giovanni Manghi almost 3 years ago

also noticed that layers from qgis server do not get a nice bar like in your test server (attached image).

#5 Updated by Even Rouault almost 3 years ago

  • Status changed from Closed to In Progress
  • Resolution deleted (invalid)

Anyway, after setting the proper cache settings it almost works as expected.

OK, I didn't remember doing anything related to that in my OSGeo4W64 install, but somehow got an issue at some time on Linux related to that. #14514 should definitely be worth investigating

I noticed that now the when adding a wfs layer (from qgis server) as first layer the qgis canvas extent is not automatically set to the layer extent. The mouse wheel do not work, "zooom full" also do not work as well "zoom to layer", leaving as only option to use the zoom out tool.

Not sure if this a client or server issue. Please let me know if I have to file a new ticket.

Hum, that's weird. Could you paste the response of GetCapabilities (particularly the FeatureType info) ?

also noticed that layers from qgis server do not get a nice bar like in your test server (attached image).

The progress bar only appears after receiving the beginning of the GetFeature response (or after a few seconds) if the estimated download time is more than 4 seconds.

#6 Updated by Giovanni Manghi almost 3 years ago

Hum, that's weird. Could you paste the response of GetCapabilities (particularly the FeatureType info) ?

tested again: if the wfs layers are the only layers in the project "zoom to full" does not work. "zoom to layer" for each layer also does not work.

GetCapabilities:

<WFS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.opengis.net/wfs" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" version="1.0.0" updateSequence="0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd">
<Service>
<Name>WFS</Name>
<Title>QGIS Server Hello World</Title>
<Abstract>Simple hello world app.</Abstract>
<OnlineResource>http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi</OnlineResource>
<Fees>conditions unknown</Fees>
<AccessConstraints>None</AccessConstraints>
</Service>
<Capability>
<Request>
<GetCapabilities>
<DCPType>
<HTTP>
<Get onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
</GetCapabilities>
<DescribeFeatureType>
<SchemaDescriptionLanguage>
<XMLSCHEMA/>
</SchemaDescriptionLanguage>
<DCPType>
<HTTP>
<Get onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
</DescribeFeatureType>
<GetFeature>
<ResultFormat>
<GML2/>
<GML3/>
<GeoJSON/>
</ResultFormat>
<DCPType>
<HTTP>
<Get onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
</GetFeature>
<Transaction>
<DCPType>
<HTTP>
<Post onlineResource="http://193.136.217.228/cgi-bin/qgis_mapserv.fcgi?map=/home/giovanni/Desktop/webgis/data/hello_world/hello_world.qgs&"/>
</HTTP>
</DCPType>
</Transaction>
</Request>
</Capability>
<FeatureTypeList>
<Operations>
<Query/>
</Operations>
<FeatureType>
<Name>ap</Name>
<Title>ap</Title>
<Abstract/>
<SRS>EPSG:3763</SRS>
<Operations>
<Query/>
</Operations>
<LatLongBoundingBox maxx="175040" minx="-123650" maxy="267670" miny="-317460"/>
</FeatureType>
<FeatureType>
<Name>clc_nivel5_evora</Name>
<Title>clc_nivel5_evora</Title>
<Abstract/>
<SRS>EPSG:27493</SRS>
<Operations>
<Query/>
</Operations>
<LatLongBoundingBox maxx="48685.2" minx="-24137.9" maxy="-70832.9" miny="-145534"/>
</FeatureType>
<FeatureType>
<Name>Country</Name>
<Title>Country</Title>
<Abstract/>
<SRS>EPSG:3857</SRS>
<Operations>
<Query/>
</Operations>
<LatLongBoundingBox maxx="1.99721e+07" minx="-1.96199e+07" maxy="1.84159e+07" miny="-1.03271e+07"/>
</FeatureType>
</FeatureTypeList>
<ogc:Filter_Capabilities>
<ogc:Spatial_Capabilities>
<ogc:Spatial_Operators>
<ogc:BBOX/>
<ogc:Disjoint/>
<ogc:Intersect/>
<ogc:Touches/>
<ogc:Crosses/>
<ogc:Contains/>
<ogc:Overlaps/>
<ogc:Within/>
</ogc:Spatial_Operators>
</ogc:Spatial_Capabilities>
<ogc:Scalar_Capabilities>
<ogc:Comparison_Operators>
<ogc:Simple_Comparisons/>
<ogc:Between/>
<ogc:Like/>
</ogc:Comparison_Operators>
</ogc:Scalar_Capabilities>
</ogc:Filter_Capabilities>
</WFS_Capabilities>

*DescribeFeatureType:*

<schema xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:qgs="http://www.qgis.org/gml" elementFormDefault="qualified" targetNamespace="http://www.qgis.org/gml" version="1.0">
<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
<element type="qgs:apType" name="ap" substitutionGroup="gml:_Feature"/>
<complexType name="apType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element minOccurs="0" maxOccurs="1" type="gml:GeometryPropertyType" name="geometry"/>
<element type="string" name="DESIGNA"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element type="qgs:clc_nivel5_evoraType" name="clc_nivel5_evora" substitutionGroup="gml:_Feature"/>
<complexType name="clc_nivel5_evoraType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element minOccurs="0" maxOccurs="1" type="gml:MultiPolygonPropertyType" name="geometry"/>
<element type="integer" name="id"/>
<element type="string" name="descri"/>
<element type="string" name="clc51"/>
<element type="string" name="densidade"/>
<element type="double" name="shape_leng"/>
<element type="double" name="shape_area"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element type="qgs:CountryType" name="Country" substitutionGroup="gml:_Feature"/>
<complexType name="CountryType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element minOccurs="0" maxOccurs="1" type="gml:MultiPolygonPropertyType" name="geometry"/>
<element type="long" name="pk"/>
<element type="string" name="name"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>

The progress bar only appears after receiving the beginning of the GetFeature response (or after a few seconds) if the estimated download time is more than 4 seconds.

One of the above layer has a quite a lot of feature, it takes several seconds do download all the features, but the progress bar does not show (as it does for the server you posted).

#7 Updated by Even Rouault almost 3 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF