[Qgis-developer] Expressions - performances of spatial operators

kimaidou kimaidou at gmail.com
Tue Jul 5 07:57:04 PDT 2016


Hi Matthias,

Thanks a lot for your answer. Unfortunately, I have no sponsors for this. I
asked to improve my knowledge on this topic ;)
Perhaps we could raise a crowdfunding for this improvement ?

Cheers,
Michaël


2016-07-05 15:31 GMT+02:00 Matthias Kuhn <matthias at opengis.ch>:

> Hi Michaël,
>
> There are a couple of possibilities to improve the performance of
> operations in two ways (which both help here AFAICS)
>
>  * Give QgsExpression::prepare() more power
>  * Compile functions (where possible)
>
> The send one depends to some degree on the first one.
>
> Let me know if you have sponsors, I've got some experimental code
> somewhere and I am very interested in working on this project.
>
> FYI, a first test - only the prepare part - some months ago improved the
> 2.5D rendering by ~30%.
>
> Regards
> Matthias
>
> On 07/05/2016 03:11 PM, kimaidou wrote:
> > 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
> >
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160705/c2cc5315/attachment-0001.html>


More information about the Qgis-developer mailing list