Bug report #5173
Shape file field precision includes the . when saving, but not when editing in the attribute table
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||14920|
e.g. if an attribute field in a shapefile has precision = 2, when I edit it I can input values like 2.12, but when I save the layer this is rounded to 2.1
Note: I am using GDAL 1.9.0 if that is relevant.
#5 Updated by Alister Hood almost 7 years ago
Yes, it is pretty much fixed.
There is a problem with a corner case which would perhaps be best filed as a new issue:
A) QGIS allows me to create a column with precision = length. I'm not sure if this itself is a bug, but it then behaves strangely with that column.
B) if I create a field with precision = length = 2 I can save either three digits before the decimal point or two after it (is this a bug or a feature of the shapefile format? Perhaps it is related to Christine's comment at #5546)
C) but the gui lets me put in a lot more digits both before and after the decimal point.
D) and even if I save the edit I can't see the "rounding" that occurs unless I reopen the attribute table.