Saturday 22 June 2019

How to calculate polygon areas and perimeters using QGIS?



Using QGIS, if I load a polygon layer and make a new column, how do I fill that column with the:



  1. area of each polygon and another column with

  2. length of the perimeter of each polygon?



Answer



Open field calculator, select the new column and type the following expression



  • For area: $area

  • For perimeter: $perimeter



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


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...