In QGIS 3, are aggregate functions over a set of array elemnts possible?
As simple as in the form of:
aggregate(array:=array(1,2,3), aggregate:='mean')
I'd use it for the task to get an average for an array of raster values, which I extract at the nodes of a linestring input feature layer. The raster values at the linestring nodes I can retrieve beautifully with the below expression, but obviuosly, there is no way to aggregate those values into on single aggregate for each feature.
with_variable('nodes',
nodes_to_points( $geometry),
array_foreach( generate_series(1, num_points(@nodes)), raster_value(DGM_Slope', 1, point_n(@nodes, @element)))
)