I'm using overlay_intersects to find the number of elements intersecting two polygon layers like this:
array_length(overlay_intersects(layer:='impact_batiment', expression:=$id, filter:= surf_total >= 40)) However, I'm interested in eliminating double counted items when they overlap. For example, the selected building is counted twice as it overlaps two zones.
I'm trying to use the min_overlap parameter like this, but it's not working. How can I access the child feature's area?
array_length(overlay_intersects(layer:='impact_batiment', expression:=$id, filter:= surf_total >= 40, min_overlap:= area(geometry(@element)/2))) 
array_distinctbetweenarray_lengthandoverlay_intersectsto count only unique$ids.