[QGIS-Developer] Expressions with aggregate in PyQGIS

Anita Graser anitagraser at gmx.at
Mon May 20 00:01:08 PDT 2019


On Mon, May 20, 2019 at 2:37 AM Nyall Dawson <nyall.dawson at gmail.com> wrote:

> On Mon, 20 May 2019 at 01:21, Anita Graser <anitagraser at gmx.at> wrote:
> > I'd like to add an example of an aggregate expression to my recent
> PyQGIS 101 tutorial on expressions [0]. I got expressions for individual
> features working but cannot figure out how to set the context for aggregate
> expressions correctly.
> > As far as I can tell, the PyQGIS Cookbook doesn't contain any
> information on this either [1].
>
> You aren't correctly constructing your expression context:
> ...

A documentation update covering this would be most welcome ;)


Thank you Nyall, that's really helpful! The expression system is awesome
and powerful but I don't think anyone could guess how to use it correctly
in PyQGIS.

I'll write it up into a tutorial and the documentation team is always
welcome to reuse the content in the official documentation.

Regards,
Anita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190520/2a54befa/attachment.html>


More information about the QGIS-Developer mailing list