2

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.

enter image description here

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))) 
2
  • 1
    You could use array_distinct between array_length and overlay_intersects to count only unique $ids. Commented May 28 at 20:48
  • @Matt okay, gotta try that Commented Jul 25 at 21:27

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.