This question already has an answer here:
My problem is to get the sum of the area of all buildings inside a block.
There are a layer with the buildings (they contain an
block_id to which block they belong and the area) and a layer with all blocks (they have a
block_id). I want to sum the areas of all buildings with the same
block_id and store this sum in a new column in the block-layer to the block with this
I add an picture to clarify my question and structure of data. There are two blocks. The left on has the
block_id = '078060' and the right one
block_id = '078070'. Now all my buildings in the left polygon have an attritbute also called
block_id with the value
'078060'. I want then to sum up all the areas of the buildings in the block and store this value to my block layer.
I thought about calculation this with the field calculator in QGIS. But I don't know how.
The question "Summing up the area on a polygon by a certain attribute result" is just a first step to solve my problem, because the calculated sum for the categories (
block_id) should be added to a new column in the blocks_layer. I was looking for a possibility to automatically calculate the sum and store it to a new column.