Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[server] Apply BBOX inside And using filterRect
In case of a WFS GetFeature request, if BBOX is not a direct child of the Filter element, it is applyed through an intersects_bbox function in the QgsFeatureRequest filterExpression. This is not compiled by providers like PostgreSQL, causing the whole filter to be interpreted on QGIS side. When interpreted on QGIS side, the srsname given in the request is not handled properly as geom_from_gml return a geometry object, projection agnostic. This result in a very long request returning no results. This is a workaround for this performance and srs issue in the case the BBOX is direct child of an And operator, itself at first level in Filter element. This is a bug fix and huge optimisation for the case we have a And with a BBOX and another condition.
- Loading branch information
Showing
with
94 additions
and 0 deletions.
@@ -0,0 +1,26 @@ | ||
Content-Type: text/xml; subtype=gml/2.1.2; charset=utf-8 | ||
|
||
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qgs="http://www.qgis.org/gml" 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 ?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs&SRSNAME=EPSG:3857&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=testlayer&OUTPUTFORMAT=XMLSCHEMA"> | ||
<gml:boundedBy> | ||
<gml:Box srsName="EPSG:4326"> | ||
<gml:coordinates cs="," ts=" ">8,44 9,45</gml:coordinates> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
<gml:featureMember> | ||
<qgs:testlayer fid="testlayer.1"> | ||
<gml:boundedBy> | ||
<gml:Box srsName="EPSG:3857"> | ||
<gml:coordinates cs="," ts=" ">913214.67407005,5606017.87425818 913214.67407005,5606017.87425818</gml:coordinates> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
<qgs:geometry> | ||
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:3857"> | ||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">913214.67407005,5606017.87425818</coordinates> | ||
</Point> | ||
</qgs:geometry> | ||
<qgs:id>2</qgs:id> | ||
<qgs:name>two</qgs:name> | ||
<qgs:utf8nameè>two àò</qgs:utf8nameè> | ||
</qgs:testlayer> | ||
</gml:featureMember> | ||
</wfs:FeatureCollection> |