Bug report #20927
QGIS Server: WFS issue using the EXP_FILTER parameter
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Alessandro Pasotti | ||
Category: | QGIS Server | ||
Affected QGIS version: | 3.5(master) | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28746 |
Description
The EXP_FILTER parameter is evaluated only querying the layer fields with the basic operators (">", "<", "=", "LIKE", etc.)
The filter doesn't work using QGIS expressions.
Examples of WFS requests where the expressions are evaluated:
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER="fieldA">10
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER="fieldA">10 AND "fieldB"<=100
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER="fieldC" LIKE 'demo'
Examples of WFS requests where the expressions are NOT evaluated:
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER=area($geometry)>100
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER=contains($geometry, geom_from_wkt('...'))
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER=intersects($geometry, geom_from_gml('...'))
- http://...?service=WFS&request=GetFeature&...&EXP_FILTER="fieldA"=concat('...','...')
Tested with QGIS 3.4.3 and QGIS 3.5(master).
The issue occurs both with WFS 1.0.0 and WFS 1.1.0.
It's a regression since the same requests on the same projects/layers published with QGIS Server 2.18 work as expected.
Associated revisions
Add tests for WFS GetFeature EXP_FILTER
Fixes #20927 - QGIS Server: WFS issue using the EXP_FILTER parameter
History
#1 Updated by Alessandro Pasotti almost 6 years ago
- Assignee set to Alessandro Pasotti
#2 Updated by Alessandro Pasotti almost 6 years ago
- Pull Request or Patch supplied changed from No to Yes
- Status changed from Open to In Progress
#3 Updated by Alessandro Pasotti almost 6 years ago
- % Done changed from 0 to 100
- Status changed from In Progress to Closed
Applied in changeset qgis|9b7e1912d427e3f1be55da2e675340da5230114f.