How to calculate the area of polygons using QGIS
To calculate the area of polygons in a shapefile using QGIS, you can use the following steps:
- Open QGIS and load the shapefile containing the polygons that you want to calculate the area for.
- Select the layer containing the polygons in the Layers panel.
- Click the
Field Calculator
button in theAttributes
toolbar. - In the
Field Calculator
dialog, select the field that you want to use to store the calculated area values. If you want to create a new field, click theNew Field
button and enter a name and data type for the field. - In the
Expression
field, enter the following expression:$area
. This will calculate the area of each polygon in the shapefile. - Click the
OK
button to calculate the area for each polygon and store the values in the selected field.
You can then view the calculated area values for each polygon by opening the attribute table for the layer.
But as always in QGIS there is more than one way of doing pretty much anything so here are a few other options
Want to say ahead of the GIS curve? listen to our podcast!
Using the Measure Area tool to calculate the area of polygons
You can use the Measure Area
tool in the Advanced Digitizing
toolbar to manually measure the area of individual polygons. To do this, select the Measure Area
tool and then click on the polygon whose area you want to measure. The area will be displayed in the Measurements panel.
- Open QGIS and load the data containing the polygons that you want to measure.
- Select the
Measure Area
tool in theAdvanced Digitizing
toolbar. - Click on the polygon whose area you want to measure. The area will be displayed in the Measurements panel.
Using the Statistics for Layer tool to calculate the area of polygons
You can use the Statistics for Layer
tool in the Processing Toolbox
to calculate the area for all polygons in the layer. To do this, open the Processing Toolbox
, search for the Statistics for Layer
tool, and select it. Then, specify the input layer and the field that you want to use to store the calculated area values. Click the Run
button to calculate the area for all polygons in the layer.
- Open QGIS and load the shapefile containing the polygons that you want to measure.
- Open the
Processing Toolbox
by clicking theProcessing
menu and selectingToolbox
. - In the
Toolbox
, search for theStatistics for Layer
tool and select it. - In the
Statistics for Layer
dialog, specify the input layer and the field that you want to use to store the calculated area values. - Click the
Run
button to calculate the area for all polygons in the layer.
Using the Field Calculator to calculate the area of polygons
You can use the Field Calculator
to calculate the area of polygons using a different expression. For example, you can use the area($geometry)
expression to calculate the area in square meters.
- Open QGIS and load the shapefile containing the polygons that you want to measure.
- Select the layer containing the polygons in the Layers panel.
- Click the
Field Calculator
button in theAttributes
toolbar. - In the
Field Calculator
dialog, select the field that you want to use to store the calculated area values. If you want to create a new field, click theNew Field
button and enter a name and data type for the field. - In the
Expression
field, enter the following expression:area($geometry)
. This will calculate the area of each polygon in the shapefile in square meters. - Click the
OK
button to calculate the area for each polygon and store the values in the selected field.