Bug report #19826
GetFeatureInfo with FILTER doesn't work for gpkg - Test added
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Paul Blottiere | ||
Category: | QGIS Server | ||
Affected QGIS version: | 3.3(master) | Regression?: | No |
Operating System: | Debian Stretch and Travis :) | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27650 |
Description
Test already in:
tests/src/python/test_qgsserver_wms_getfeatureinfo.py
with
@unittest.expectedFailure
# TODO make filter work with gpkg and move test inside testGetFeatureInfoFilter function @unittest.expectedFailure def testGetFeatureInfoFilterGPKG(self): # 'test_project.qgz' ='test_project.qgs' but with a gpkg source + different fid # Regression for #8656 Test getfeatureinfo response xml with gpkg datasource # Mind the gap! (the space in the FILTER expression) self.wms_request_compare('GetFeatureInfo', '&layers=testlayer%20%C3%A8%C3%A9&' + 'INFO_FORMAT=text%2Fxml&' + 'width=600&height=400&srs=EPSG%3A3857&' + 'query_layers=testlayer%20%C3%A8%C3%A9&' + 'FEATURE_COUNT=10&FILTER=testlayer%20%C3%A8%C3%A9' + urllib.parse.quote(':"NAME" = \'two\''), 'wms_getfeatureinfo_filter_gpkg', 'test_project.qgz')
Basically the server outpus:
... <Layer name="testlayer èé"> <Feature id="2"> <Attribute value="2" name="id"/> <Attribute value="two" name="name"/> <Attribute value="two àò" name="utf8nameè"/> ...
instead of
... <Layer name="testlayer èé"> <Feature id="2"> <Attribute value="0" name="id"/> <Attribute value="2" name="name"/> <Attribute value="two" name="utf8nameè"/> ...
It seems the output values index are shifted with +1.
Associated revisions
Fixes #19826 - Use subset layer to manage fid
History
#1 Updated by Paul Blottiere about 6 years ago
- Assignee set to Paul Blottiere
#2 Updated by Paul Blottiere about 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|5a9067e722be19cd0ceb3c4417f034ad40c02bb4.