[Qgis-developer] QgsFeatureRequest::FilterType are mutually exclusive

Hugo Mercier hugo.mercier at oslandia.com
Tue Apr 28 02:28:55 PDT 2015


Le 28/04/2015 10:29, Matthias Kuhn a écrit :
> So far it seems that combining all the filters with an AND seems to be
> the preferred solution but let's wait for some more feedbacks.

What about spatial indexes ? How does the provider know only a bounding
box test (with index) is required instead of a full intersection test
with an arbitrary geometry ?

> 
> I'll just briefly answer some of the previous comments for now
> 
> On 04/28/2015 09:50 AM, Hugo Mercier wrote:
>> Hi Matthias,
>>
>> Le 27/04/2015 17:55, Matthias Kuhn a écrit :
>>> Hi all,
>>>
>>> I am currently working on an "expression compiler". This will allow to
>>> execute (some) expressions server side. Currently postgres is the main
>>> target but it can be adapted to others as well. This makes it very easy
>>> to write provider-independent code that is able to make use of database
>>> indexes, reduce network traffic and relocate CPU usage to a server. I
>>> will write more about this later.
>> Nice. Looking forward to read this :)
> A bit more is already there :)
> 
> https://github.com/qgis/QGIS/pull/2012

Cool.
I will have to see how this can be reused for possible SQL
"transformations" in a virtual layer (upcoming ...)

> 
>> Yes, IMHO filterXXX() is there to express a possible use of indexes. So
>> I would be to keep filterRect() and filterExpression() and then remove
>> filterType.
> I just thought that an additional filter type "FilterCombined" may also
> be an option...

Why not.

> 
>> For backward compatibility, we could decide to filter only by expression
>> if a filterRect is also present.
> I don't understand this. Currently it's only possible to filter by
> expression without a filter rect so making a rect mandatory for an
> expression filter would be diametrical to this. Can you explain what you
> mean?

Sorry, I mixed up what is possible currently and what you propose to add.



More information about the Qgis-developer mailing list