[Qgis-developer] have aggregate/window expressions ever been discussed?

G. Allegri giohappy at gmail.com
Tue May 27 06:40:06 PDT 2014

I agree with all of you about not reinventing the wheel and, yes, let's not
fragment QGIS' capabilities on data querying/filtering/etc.
My first idea was simply (but I'm not sure how much simple it is) to be
able to perform aggregate queries like in WINDOW functions. In my job it's
something I find very useful, and I would like not to have to export my
layers to a PostGIS DB just to do it.

Some basic examples:

 - get the average area of some polygon features
 - get the relative dimension against some other feature's dimensions
 - etc.

AFAIK these kind of queries cannot be run on Sqlite in one single shot.
This is why I wasn't thinking to Sqlite (or SQL anyway) to implement it,
but as an extension to expression engine, in a MapReduce pattern


2014-05-27 15:03 GMT+02:00 Régis Haubourg <
regis.haubourg at eau-adour-garonne.fr>:

> Hugo Mercier wrote
> > Or
> >> calculated fields in view can't be explicitly cast, so QGIS should have
> >> to
> >> guess data type based on a data scan (a major unadressed issue of
> sqlite)
> >
> > Hmmm I wasn't aware of this limitation in SQLITE views :(
> Yes, SQLITE does dynamic typing, so user or provider has to scan values to
> guess the right type.
> Here is a sqlite topic on that [0]
> And here my initial post in qgis list [1]
> [0]
> http://sqlite.1065341.n5.nabble.com/Computed-columns-in-VIEWs-return-NULL-but-should-be-able-to-be-typed-Any-ideas-td56769.html#a56770
> [1]
> http://osgeo-org.1560.x6.nabble.com/Spatialite-can-t-type-fields-of-a-view-td5058436.html
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/have-aggregate-window-expressions-ever-been-discussed-tp5142215p5142714.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

Giovanni Allegri
Twitter: https://twitter.com/_giohappy_
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140527/96460b95/attachment.html>

More information about the Qgis-developer mailing list