Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OGC Filter Encoding to WMS #104

Open
pvalsecc opened this issue Sep 21, 2017 · 5 comments
Open

Add support for OGC Filter Encoding to WMS #104

pvalsecc opened this issue Sep 21, 2017 · 5 comments

Comments

@pvalsecc
Copy link

QGIS Enhancement: Add support for OGC Filter Encoding to WMS

Date 2017/09/21

Author Patrick Valsecchi

Contact patrick.valsecchi@camptocamp.com

maintainer @pvalsecc

Version QGIS 3.0

Summary

The current WMS filter mechanism provided by QGIS is limited to QGIS specific expressions. This QEP proposes to add support of OGC Filter Encoding, following the same parameter format as MapServer and GeoServer.

Proposed Solution

Add another format for the WMS FILTER parameter that follows the current MapServer/GeoServer “standard”:

…&FILTER=(<filter>...filter for layer 1...</filter>)(<filter>...filter for layer 2...</filter>)...

In the code handling the WMS format parameter, if the value starts with “(<” or with “<” (both starting strings not possible with the current format), we split the filters for the different layers and generate the QgsFeatureRequest from the XML, using QgsWfs::parseFilterElement (moving this function to QgsOgc or something).

The answer to GetCapabilities from MapServer doesn’t contain any reference to the filtering. So no change there.

Example(s)

See http://mapserver.org/development/rfc/ms-rfc-118.html

Affected Files

  • src/server/services/wfs/qgswfsutils.cpp
  • src/server/services/wms/qgswmsrenderer.cpp
  • Some other files impacted by refactoring

Performance Implications

Should have no impact on queries using the current filter format and the performance should be similar for the OGC Filter Encoding format.

Backwards Compatibility

No problem there. The old format will still be supported.

Votes

(required)

@pvalsecc
Copy link
Author

@rldhont, @rouault, an opinion on that?
Anybody else to ask?

@mhugent
Copy link

mhugent commented Oct 5, 2017

+1
Supporting OGC filter syntax in addition to the datasource syntax will be a plus

@rldhont
Copy link

rldhont commented Oct 5, 2017

+1
This will also need an enhancement in QgsVectorLayer or QgsMapSettings to defined filter based on expression for rendering.

@haubourg
Copy link
Member

haubourg commented Nov 8, 2017

ping @pblottiere too

@nboisteault
Copy link

@pvalsecc Thank you for this feature. Does filter accept GML version 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants