Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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) the length of the perimeter of each polygon?

share|improve this question
1  
so, I have changed and saved the shapefile in the projection UTM to get meter squared area but i am still get a low decimal value for the area. For example, a polygon that is 102 km2 is showing up in the attribute table at 0.0102. I have used both methods fTools and the calculator in the attribute table. What am I doing wrong? Thanks –  user21644 Sep 2 '13 at 22:03
    
I was also seeing absurdly low numbers, but I think it was because I had the wrong CRS. I clicked the icon in the bottom right and changed the CRS and the numbers started to look better after that. –  Brian Z Sep 20 '13 at 5:11
add comment

2 Answers

up vote 13 down vote accepted

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.

share|improve this answer
    
Are there other functions that begin with $? –  HealthMaps Jul 24 '12 at 4:58
1  
Many actually, you'll see them in the field calculator. in QGIS 1.8, it's nicely organized under 'function list' in field calculator –  spatialthoughts Jul 24 '12 at 5:49
add comment

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.