[QGIS-Developer] Spatial filtering of OAPIF layers
Johannes Kröger (WhereGroup)
johannes.kroeger at wheregroup.com
Thu Jan 9 05:12:01 PST 2025
Hi!
To potentially improve our spatial filtering plugin
https://plugins.qgis.org/plugins/spatial_filter/ I am trying to figure
out what is actually possible in QGIS in terms of spatial filtering of
OAPIF and WFS layers via layer.setSubsetString(...).
https://qgis.org/pyqgis/master/core/QgsVectorLayer.html#ogc-api-features-data-provider-oapif
says
> You can use various functions available in the QGIS Expression list,
however the function must exist server side and have the same name and
arguments to work.
Those filters are a complex setup around QGIS expressions, SQL queries
and automatic OGC/FES filter conversion and I am currently too dumb to
figure out what this actually means.
- Does "QGIS Expression list" refer to the list of QGIS expression
functions and variables, visible e.g. in a Field Calculator dialog?
- Could someone name some example functions that one could use with a
standard OAPIF server for server-side filtering?
Thanks!
Hannes
PS:
I have some strong suspicion that this line actually belongs to the WFS
provider as it was originally written in the WFS section in
https://github.com/qgis/QGIS/commit/920253d17d1b109e47d3698f989a3d85a40054eb#diff-6e6383cd3adade52942c25186b2cf9985625fe338cadd3601a19467665eb455aR209
and only got moved to the OAPIF section by Even's commit in
https://github.com/qgis/QGIS/commit/c7f29d501fde79d01776e0f891255199493ed88f#diff-6e6383cd3adade52942c25186b2cf9985625fe338cadd3601a19467665eb455a
If that is the case then I would still be interested in examples for
WFS, instead of OAPIF, and to know what the documentation should read
instead for server-side(!) filtering of OAPIF.
PPS: Potentially related bug report
https://github.com/qgis/QGIS/issues/60092
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250109/063e42f7/attachment.htm>
More information about the QGIS-Developer
mailing list