Bug report #16509

Updated by Jürgen Fischer about 4 years ago

Hi there !

(QGIS Server v2.18)

In a project with have multiple points layers (named here pfa and pfa2).
(These layers are in a group "Punti fissi" that is in a group "MU Cadastre")

Both layers support WMS and WMF queries (Set in the layer property)
Both layers are published in the WFS capacity of the Project property.

Now, If I do a request with pfa1 as first Query and pfa2 as second Query (but in the same request), I got twice the result for pfa1 and any informations for pfa2. If I invert pfa 1 and pfa2, the result is inverted. If I add a pfa3, I got third time the result for the first queried result. If I query only one layer, that works fine.

The payload of the request (POST request):

<pre>
<GetFeature xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" outputFormat="GML3" maxFeatures="20" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<Query xmlns:feature="http://www.qgis.org/gml" typeName="feature:pfa1" srsName="EPSG:2056">
<Filter xmlns="http://www.opengis.net/ogc">
<BBOX>
<PropertyName>the_geom</PropertyName>
<Envelope xmlns="http://www.opengis.net/gml" srsName="EPSG:2056">
<lowerCorner>2715684.9999999995 1111404.444444444</lowerCorner>
<upperCorner>2716404.9999999995 1112474.444444444</upperCorner>
</Envelope>
</BBOX>
</Filter>
</Query>
<Query xmlns:feature="http://www.qgis.org/gml" typeName="feature:pfa2" srsName="EPSG:2056">
<Filter xmlns="http://www.opengis.net/ogc">
<BBOX>
<PropertyName>the_geom</PropertyName>
<Envelope xmlns="http://www.opengis.net/gml" srsName="EPSG:2056">
<lowerCorner>2715684.9999999995 1111404.444444444</lowerCorner>
<upperCorner>2716404.9999999995 1112474.444444444</upperCorner>
</Envelope>
</BBOX>
</Filter>
</Query>
</GetFeature>
</pre>


The answer:

<pre>
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:qgs="http://www.qgis.org/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.qgis.org/gml http://localhost:8580/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=pfa1,pfa1&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:2056">
<gml:coordinates cs="," ts=" ">2700519.74999999,1076245.12499999 2724130.50000001,1158202.12500001</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<qgs:pfa1 fid="pfa1.1">
<gml:boundedBy>
<gml:Box srsName="EPSG:2056">
<gml:coordinates cs="," ts=" ">2716072.066,1111642.902 2716072.066,1111642.902</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:geometry>
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:2056">
<coordinates>2716072.066,1111642.902</coordinates>
</Point>
</qgs:geometry>
<qgs:t_id>254298</qgs:t_id>
<qgs:identan>CH020000TE</qgs:identan>
<qgs:numero>508a</qgs:numero>
<qgs:geomalt>528.201</qgs:geomalt>
<qgs:attendplan>no</qgs:attendplan>
<qgs:attendplan_txt>no</qgs:attendplan_txt>
<qgs:precalt>0.3</qgs:precalt>
<qgs:attendalt>si</qgs:attendalt>
<qgs:attendalt_txt>si</qgs:attendalt_txt>
</qgs:pfa1>
</gml:featureMember>
<gml:featureMember>
<qgs:pfa1 fid="pfa1.2">
<gml:boundedBy>
<gml:Box srsName="EPSG:2056">
<gml:coordinates cs="," ts=" ">2716105.326,1111650.397 2716105.326,1111650.397</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:geometry>
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:2056">
<coordinates>2716105.326,1111650.397</coordinates>
</Point>
</qgs:geometry>
<qgs:t_id>254299</qgs:t_id>
<qgs:identan>CH020000TE</qgs:identan>
<qgs:numero>507a</qgs:numero>
<qgs:geomalt>528.117</qgs:geomalt>
<qgs:attendplan>no</qgs:attendplan>
<qgs:attendplan_txt>no</qgs:attendplan_txt>
<qgs:precalt>0.3</qgs:precalt>
<qgs:attendalt>si</qgs:attendalt>
<qgs:attendalt_txt>si</qgs:attendalt_txt>
</qgs:pfa1>
</gml:featureMember>
<gml:featureMember>
<qgs:pfa1 fid="pfa1.1">
<gml:boundedBy>
<gml:Box srsName="EPSG:2056">
<gml:coordinates cs="," ts=" ">2716072.066,1111642.902 2716072.066,1111642.902</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:geometry>
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:2056">
<coordinates>2716072.066,1111642.902</coordinates>
</Point>
</qgs:geometry>
<qgs:t_id>254298</qgs:t_id>
<qgs:identan>CH020000TE</qgs:identan>
<qgs:numero>508a</qgs:numero>
<qgs:geomalt>528.201</qgs:geomalt>
<qgs:attendplan>no</qgs:attendplan>
<qgs:attendplan_txt>no</qgs:attendplan_txt>
<qgs:precalt>0.3</qgs:precalt>
<qgs:attendalt>si</qgs:attendalt>
<qgs:attendalt_txt>si</qgs:attendalt_txt>
</qgs:pfa1>
</gml:featureMember>
<gml:featureMember>
<qgs:pfa1 fid="pfa1.2">
<gml:boundedBy>
<gml:Box srsName="EPSG:2056">
<gml:coordinates cs="," ts=" ">2716105.326,1111650.397 2716105.326,1111650.397</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:geometry>
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:2056">
<coordinates>2716105.326,1111650.397</coordinates>
</Point>
</qgs:geometry>
<qgs:t_id>254299</qgs:t_id>
<qgs:identan>CH020000TE</qgs:identan>
<qgs:numero>507a</qgs:numero>
<qgs:geomalt>528.117</qgs:geomalt>
<qgs:attendplan>no</qgs:attendplan>
<qgs:attendplan_txt>no</qgs:attendplan_txt>
<qgs:precalt>0.3</qgs:precalt>
<qgs:attendalt>si</qgs:attendalt>
<qgs:attendalt_txt>si</qgs:attendalt_txt>
</qgs:pfa1>
</gml:featureMember>
</wfs:FeatureCollection>
</pre>


Expected result: 2 results for pfa1, 3 for pfa2.
The result: 4 results for pfa1, 0 for pfa2

*Can you reproduce this issue ?*
Thanks in advance

Back