[Qgis-developer] Expressions - performances of spatial operators

kimaidou kimaidou at gmail.com
Tue Jul 5 06:11:42 PDT 2016


Hi all,

I am a bit curious about performances concerning the use of Spatial
expressions in QGIS, for example to select features like this

 intersects(
    $geometry,
    geom_from_wkt( 'MultiPolygon (((649308.28000000002793968
6978002.05999999959021807, 649295.32999999995809048
6977994.54999999981373549, 649235.92000000004190952
6978013.50999999977648258, 649182.53000000002793968
6978077.32000000029802322, 649212.34999999997671694
6978159.53000000026077032,  649308.28000000002793968
6978002.05999999959021807)))')
)

NB: I have simplified the WKT representation here

I am running this expression inside QGIS 2.14, for a layer containing
approx. 100 000 features ( buildings).
The WKT polygon represents a very small area compared to the whole layer:
500 features only are selected.

It seems to me no spatial index is used, because it takes some time to run
~ 3 minutes.

I have checked the option to run expressions server side, and all the
layers are PostGIS layers.

What could be done to improve this kind of expressions, which can be used
elsewhere in QGIS ( to toggle labels for example ) ?

Regards
Michaƫl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160705/e8748f02/attachment.html>


More information about the Qgis-developer mailing list