I have a polygon layer in QGIS (building outlines) and I made a grid over this layer using the MMQGIS function. I want to calculate the area of the building outlines in each grid cell (so it becomes another column in the grid cell layer).

Any ideas?

It's all in vector.

1 Answer 1


Use this expression on the grid layer and replace building_layer_name with the name of your layer containing the polygons of the buildings:

    area ( 
        intersection (
            collect_geometries (overlay_intersects ('building_layer_name',$geometry))

The expression used on the grid layer to create a label, indicating the area each cell overlaps with the building (2x2 m grid):

enter image description here

Your Answer

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

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