14 Commits

Author SHA1 Message Date
Harrissou Sant-anna
7269abe1ab Add precision to concatenator parameter 2023-04-11 07:25:37 +10:00
Alex
d7ffe0b7ec
DelazJ bonification
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
2022-01-11 11:17:49 -05:00
roya0045
57e25ca19e proposal tags
made with https://gist.github.com/roya0045/eaa19acabe1033569f97b40604b7e6df
2022-01-07 08:33:29 -05:00
Harrissou Sant-anna
fc1f3bfbf2 Add example for aggregate collect functions
fix #24962
2020-08-31 11:19:06 +10:00
Harrissou Sant-anna
1d0749d72d Extend aggregate's concatenator and order_by args description 2020-08-10 08:32:18 +10:00
Harrissou Sant-anna
43a20fed2b Updates on expression functions help
fix examples and description
add/update examples to "cross-link" functions
2020-08-10 08:32:18 +10:00
SrNetoChan
d097adeacd Add groups to function_help files 2020-07-02 15:03:16 +10:00
Harrissou Sant-anna
ef11da6359 Add "concatenate_unique" and "array_agg" as aggregate parameter
of aggregate function
2019-10-03 13:28:36 +10:00
Nyall Dawson
2e5257372b [FEATURE] Add order by support to expression aggregate and concatenation functions
Because certain aggregates and concatenation requires results in
a certain order, this change allows specific control of the order
features are added to the aggregate during an expression evaluation.

E.g.

concatenate("Station",concatenator:=',', order_by:="Station")

will give a comma separated list of station names in alphabetical
order, rather than layer feature order.

Sponsored by SMEC/SJ
2019-05-10 06:23:56 +10:00
stra2da
35b11b02b2 Update aggregate 2018-09-11 07:28:59 +10:00
Matthias Kuhn
adb184e435 Add documentation for @parent aggregate filter 2016-10-27 23:11:51 +02:00
nirvn
2a326ef8ad [FEATURE] support aggregation of geometry
This feature adds a 'collect' aggregation method resulting in a
single multipart geometry from a list of geometries. This is exposed
in the expression engine via the existing aggregate() function,
as well as a new collect() function.
2016-08-24 08:39:05 +07:00
Harrissou Sant-anna
e3867832bb Remove duplicate example (#3360) 2016-08-10 14:45:34 +02:00
Nyall Dawson
307aabd66a [FEATURE] Aggregates for expressions
This commit adds a number of different forms of aggregates to
the expression engine.

1. Aggregates within the current layer, eg sum("passengers")
Supports sub expressions (ie sum("passengers"/2) ), group by
( sum("passengers", group_by:="line_segment") ), and optional
filters ( sum("passengers", filter:= "station_class" > 3 ) )

2. Relational aggregates, which calculate an aggregate over
all matching child features from a relation, eg
relation_aggregate( 'my_relation', 'mean', "some_child_field" )

3. A summary aggregate function, for calculating aggregates
on other layers. Eg aggregate('rail_station_layer','sum',"passengers")
The summary aggregate function supports an optional filter,
making it possible to calculate things like:

aggregate('rail_stations','sum',"passengers",
  intersects(@atlas_geometry, $geometry ) )

for calculating the total number of passengers for the stations
inside the current atlas feature

In all cases the calculations are cached inside the expression
context, so they only need to be calculated once for each
set of expression evaluations.

Sponsored by Kanton of Zug, Switzerland
2016-05-17 10:53:25 +10:00