I have created a shapefile with some polygons and am now trying to calculate the area of these polygons. The original CRS was WGS84, I have reprojected it to WGS 84 / World Mercator so unit is metres. On-the-fly projection is on. If I'm now using the field calculator to calculate the area of the polygons using $area, I first get some really weird values in my output column (far too high) and if I click 'save' or end the toggle mode, the values change to negative values which are the same for all polygons. Switching to another CRS and reprojecting the file again e.g. to GDA94/MGA55 EPSG:28355 and calculating the area creates again funny values, some of them negative. I can't figure out where the problem is and am grateful for any help! Thanks a lot!

  • Can you share a sample of the problematic data? – underdark Nov 8 '13 at 15:56
  • I can share a sample - in which format/how would it be best? I have mapped the same shapefile in ArcGIS and the field calculator there gives me correct results - not sure if it's something about the data or a bug in QGIS. – Kristina Nov 8 '13 at 20:31
  • A zipped Shapefile would do. Do you have Dropbox or similar to share? – underdark Nov 8 '13 at 21:40
  • Can you share the extent values from your original data from Properties, Metadata tab of the layer? Area calculation in World Mercator will give wrong results if 90° North or South is included. – AndreJ Nov 9 '13 at 5:59

If the values are first very big and then negative, you are most likely running into an integer overflow problem. Are the polygons very big in reality? Maybe you shouldn't calculate square meters but at least kilometers.

  1. Load the orginal file in WGS84, don't change anything
  2. Save as ... with a target CRS in meters (e.g. UTM depending on your area of interest)
  3. Load the new file and then calculate the area:

for km²: $area / 1000000

for ha: $area / 10000

On-the-fly reprojection is not needed for this task.

  • The polygons are big, but not that big. Where can I find the setting for square kilometers? I was wondering anyway which unit the calculated area is in, looked more like cm2... Thanks underdark, you're becoming my personal mentor for qgis. – Kristina Aug 31 '13 at 14:21
  • Thanks for the explanation how to get km2... I have tried this now, however, the values are still wrong and far too big. I have compared the values with a file where the area is given and have created an identical polygon in my shapefile, but it's just not working. Maybe it's something with the projection? If I save the file under WGS84/World Mercator and then reopen it in qgis with the map set to the same CRS and then open another shapefile which should depict the same area, the two won't match... I'm not familiar with setting different CRSs and am totally puzzled... – Kristina Aug 31 '13 at 15:22

If you are getting negative values in area, I will recommend you to first clean your shapefile. Reproject your shapefile in equal area projection and then use calculator $area function to get area. Hope it helps.

  • Please see my comment below, I have tried this several times with different reprojections... no change. – Kristina Sep 4 '13 at 16:11

A suggestion: I too have had GPS'd polygons return negative area values before. I finally figured out why. When I zoomed in really close to a cluster of odd dangles, I found that a few vertices were overlapping themselves, creating the negative value. If you delete the odd nodes, then it becomes a whole polygon and should have a positive value for the area calculation.

  • 2
    Your experience is interesting: didn't cleaning the dataset (as suggested in the earlier answer by @Deep) fix up those "odd nodes"? – whuber Nov 18 '13 at 21:50

I have this problem when I'm using topological editing on a shapefile or spatialite layer and on the fly (OTF) reprojection is enabled. The 'avoid intersections' function does not work consistently and some polygons' nodes are unselectable (though the polygon can still be selected and deleted). This also affects the 'Save As...' function: some polygons are not exported. These problem polygons are not necessarily identified with the 'Check Geometry Validity..." tool.

Disabling OTF and recalculating the area solves the problem on my machine. Please try that with both of your reprojection and get back to us.

-QGIS 2.10.1 on Debian 8.1.


I had a similar problem when i calculated the area. I solved this using the function polygon properties of SAGA in Qgis

  • Hi Pipe Marulanda, welcome to GIS SE. It's always great to add your ideas and solutions. I guess it would help others if you could elaborate a bit on this solution and add some more details. Like this, it will be more helpful to the community. – Babel Apr 12 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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