I am calculating the areas of my polygons in Qgis using $area and everything works fine until I click on "save". All my values are rounded to an integer. I tired setting the output field type to decimal but still see the same problem? Any solution to that? I am using Qgis 1.8

2 Answers 2


Apart from setting the precison to a value greater than zero, I would suggest to increase the field width as well, because the given precision reduces the remaining field width.

A field width of 15 and precision 3 should work well.

  • I had the same issue as the OP this is the answer that worked for me
    – user32496
    Aug 2, 2017 at 3:32

If I calculate the $area in an integer field I'have got the same result (there is an automatic conversion):

enter image description here

I think you must specify the "real" type when you create a field :

enter image description here

  • I thought the same but this behaviour does not change. It still rounds the number...It works if I set it to text but then I am not able to use the numbers for calculations Jul 10, 2013 at 15:36
  • 4
    it's because, you have to also define the precision (see input below the field type). For example, pass the value to 3 and you will see the change.
    – simo
    Jul 10, 2013 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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