[GIS] Summing polygon area by category using QGIS

qgisstatistics

I have a vector layer of habitats. Each feature belongs to a category and has its area calculated. I'm trying to find out the total area of each type of habitat.

I've looked at QGIS "Statistics by categories" which gives everything but the Sum of each category.

The GroupStats plugin looks like it would do it, but I can't get the "calculate" button to activate.

I'm new to QGIS tools/scripts etc but happy to try to modify an existing tool but haven't yet found where they are or how to do this.

Best Answer

You are correct, Group Stats plugin is exactly what you need.

See the example below. You need to drag and drop your category field into Rows, and your area field and the function sum into value. In my image, "Freguesia" is my Category, and I used the area function instead of a field.

enter image description here

The beauty of this plugin is that you can do the same with more than one category by using rows and columns.

enter image description here

Related Question