[QGIS-Developer] Proposal: changing the behaviour of QgsFeatureRequest

Alexis R.L. alroyliz0 at gmail.com
Sat Apr 27 14:17:32 PDT 2019


Greetings Everyone,

While working on my PR (9648) I noticed that expression filter and a list
of feature IDs are both considered the same thing cannot be used as two
filtering criteria.

I am aware that the intent was to only have one element active to filter
out features other than the rectangle(? might be wrong on that one).

What I am wondering if it would be a good thing to have both co exist
(mostly for my PR as of now). A simply way to do so would be to use the
give feature ids as the list to iterate over and check for the expression
if there is one.

I assume that such a thing might be implemented without touching the
current behaviour, otherwise one would have to remove either the expression
or the IDs in some case when we want to override the current filtering
method.

Using multiple filtering method might be better than only forcing one and
would provide more flexibility.

As I have a PR that is related to this (
https://github.com/qgis/QGIS/pull/9816 ) I would like to address this point
in it and would like to have the discussion occur there as to the best way
to implement such a thing without any breakage if people are not opposed to
having only one filtering method in qgsfeaturerequest.

Thanks and have a nice day!

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190427/53ef8377/attachment.html>


More information about the QGIS-Developer mailing list