[Qgis-developer] Merging of incompatible changes

Martin Dobias wonder.sk at gmail.com
Sat Oct 27 12:42:08 PDT 2012


On Sat, Oct 27, 2012 at 2:46 PM, Matthias Kuhn <matthias.kuhn at gmx.ch> wrote:
>
> Sounds like something worth considering.
> Something else I have been thinking of and what would increase
> performance pretty good in some situations would be to be able to select
> by an expression:
>
> myFeatureSet = provider.select( QgsExpression( 'attr1 = 1 AND attr2 > 5'
> ) )
> while myFeatureSet.nextFeature(myFeature):
>   do interesting stuff...

Yes, this is another feature I have in my mind, something that could
be later added to QgsFeatureRequest. Actually for expressions there
are two choices: expressions for QgsExpression and provider's native
expressions (e.g. SQL supported by PostGIS). The difference is that
the former ones should work for any provider, while the latter ones
only for those with some native expression language - those are likely
to be faster since the expression would be executed in the backend, so
less data transfer and thus faster fetching.

Martin


More information about the Qgis-developer mailing list