I'm trying to create a new field in my attribute table that can assign a value to the polygon depending on how many layers of my buffers it intersects.

So i have a base layer called "properties" and other layers from which i have created different buffers "transport" "green areas" "city center"

In the "properties" layer I want to add a new field to the attribute table assigning a different value depending how many layers (buffers) the polygon intersects.

For example:

If the polygons in "properties" intersects or is contained just "transport" = 1

If the polygons in "properties" intersects or is contained "transport" and "green areas" = 2

If the polygons in "properties" intersects or is contained "Transport", "green areas" and "city center" = 3

If the polygons in "properties" does not intersect any buffer= 0

Any idea if this can be done? And if yes how can I do it? im quite new to QGIS and im still exploring and learning how all the expressions work.

1 Answer 1


Use this expression in the properties layer to calculate the count of intersecting layers.

        -- list of layer names to evaluate if are intersecting "properties layer
            'green areas',
            'city center'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.