Bug report #8430
Field Calculator - area failing - overflowing
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||duplicate|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17199|
I tried to use QGIS to calculate the areas of things, but as you can see in the dec2 (decimal size 19) and qgis_dec20 (decimal size 20) columns, it overflowed and went negative.
arcgisArea is what ArcGIS came up with.
#1 Updated by Jonathan Moules over 7 years ago
As a follow on and having discovered #8431 - it turns out that the data is correct after the calculation - QGIS shows it in the attribute table correctly whether as an integer (with decimal place!) or decimal.
However, when you "save edits", it goes to the dbf file. It is at this point it turns into a negative.
The negative you get depends on format.
dec2 was actually "integer".
qgis_dec20 was a 20 width decimal.