[QGIS-Developer] Creating Arrays and Maps from aggregates and relations
arnaud.morvan at camptocamp.com
Sun Aug 6 00:18:15 PDT 2017
Note that I start working on array_agg (aggregate as an array).
Le 04/08/2017 à 21:18, Andreas Neumann a écrit :
> At the moment an array or map data structure in an expression can only
> be created by using the array() and map() constructor function where
> one has to explicitly include all the values at the creation of the
> data structure. Arrays can also be created from strings with the
> string_to_array function.
> Wouldn't it be useful if the arrays could be created by an aggregate
> function and in particular the relation_aggregate function (esp.
> useful for analyzing 1:n relations)?
> Something like: aggregate(layer:='countries', aggregate:='array',
> expression:="area") --> array with all areas of the countries
> calculation:="towns") --> array with all towns that are related to a
> Similar for maps:
> aggregate(layer:='countries', aggregate:='map', expression:="area",
> mapAttributes:="area, population") --> nested maps with all areas and
> population per country.
> mapAttributes:="town_name,town_population") --> array with all town
> attributes that are related to a country.
> Any thoughts?
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the QGIS-Developer