I am manually adding a decimal column in qgis and set the width and precision to one more than I actually need (Width: 5, Prec: 5)so the number comes out as 0.XXXXX, but when I save my eidts qgis is still rounding the decimal off at 3 places (0.XXX00).

1 Answer 1


You have to set a Width value greater than the Precision value.

If you want 5 digits behind the period, the width has to be 7 to include the period and the 0 (or sign) before it. If the numbers are greater than 10, you have to expand the width as well.

Don't be shy with the width value, it was a delimiter in old FORTRAN times when data storage was expensive.

  • There's no reason to set width greater than necessary, though that may be precision+3 when negative values are present. The derogatory reference to FORTRAN is misleading, at best.
    – Vince
    Jan 3, 2015 at 12:36
  • I was not taking the period into account, that was my problem. Awesome, thanks. Jan 3, 2015 at 22:39

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.