14

Using QGIS, if I load a polygon layer and make a new column, how do I fill that column with the area of each polygon and another column with the length of the perimeter of each polygon?

Taras
  • 32,823
  • 4
  • 66
  • 137
HealthMaps
  • 995
  • 3
  • 10
  • 23

2 Answers2

29

Open the Field Calculator, select the new column and type the following expression

Make sure your layer is in a projected coordinate system (not lat/long) and in correct units (i.e. if your layer's projection has 'meters' as units, your area will be square meters).

Note that reprojecting layers on-the-fly does not change the units for area/perimeter calculation, so you have to first reproject using Save as ... with the correct target CRS.

enter image description here

enter image description here

Taras
  • 32,823
  • 4
  • 66
  • 137
spatialthoughts
  • 6,106
  • 28
  • 49
9

For QGIS versions 2.16 and above (see the Changelog for QGIS 2.16) use the "Add geometry attributes" tool from Vector > Geometry Tools > Add geometry attributes.

You also can use fTools: Vector menu -> Geometry Tools -> Export/Add geometry columns

It updates your layer automatically by adding "AREA" and "PERIMETER" columns.

Taras
  • 32,823
  • 4
  • 66
  • 137
lrssvt
  • 1,921
  • 12
  • 9