regexp_replace(aggregate(layer:='Prcl_Lyr', aggregate:='concatenate', expression:="Prp_Ownr",filter:=intersects( $geometry, geometry(@parent)), concatenator:='/'), '[/]{2,}', '/')
Polygon Layer "Parcell_Lyr"
Field holding Owner Data "Prop_Ownr"
The parent layer is the line layer with the lines, for which we want to collect the polygon data, intersected by the single line features.
For aggregated NULL or empty strings the concatenator character would be replicated without strings inbetween - for this, the regex "[/]{2,}" which matches a forward slash, repeated twice or more, will replace those doubled slashes with a single one.
25 Nov 2020
QGIS3: Aggregate Data of Intersecting Features: Concatenate String Attributes of Polygons Crossed by Line Features
13 Aug 2019
Aggregation of Different Layers in QGIS 3.x with Field Calculator Expression Alone!!
Here's an example of how to "spatially aggregate" Polygon attribute values over features of a point layer by intersecting the two layers. Go in "Edit mode" with the target layer and check "Virtual Field" with type "decimal". Then use this in expression builder, where "layer" is the point layer, and aggregate the attribute values that intersect the target layer's geometry. With "Expression" you can define the attribute, that should aggregated!
aggregate(layer:='BIKFFH_Karwendel BIKFFH_PL', aggregate:='sum', expression:="LNUMMER",
filter:=intersects($geometry,geometry(@parent)))
Subscribe to:
Posts
(
Atom
)