Bug report #16692
Pb 0 instead of NULL when creating a new SHP field
|Affected QGIS version:||2.14.15||Regression?:||Yes|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||24591|
In QGIS 2.14.15, with a SHP layer, when I create a new field (type real for example), when I save the modifications, all the values of this new field become 0.00 instead of keeping a NULL value. It's very annoying when you use this field with labeling placement, because all the labels are drawn at 0,0 instead of keeping an automatic placement whent it's a NULL value.
This bug is not present in QGIS 2.14.14 nor in QGIS 2.18.9.
#1 Updated by Regis Haubourg about 4 years ago
- Status changed from Open to Feedback
shp can't handle NULL values, see: http://support.esri.com/technical-article/000005811
Maybe in previous version QGIS stored NULL until a real commit was made to the dbf and then it was converted back to 0. The behavior now is better, because it is less tricky.
I you need to handle NULL, consider using GPKG, spatialite, Postgis or any younger format than the old shp (the humoristic way to advertise it is here: https://twitter.com/shapefiIe :) )
#4 Updated by Steve Lowman almost 4 years ago
I agree this is a real problem change, particularly for label placement in layers with many features. Suddenly we have a big problem, where there was never a problem before. Sorry I have nothing more constructive to contribute, just suggesting high priority is appropriate for this. Any confirmation it will be fixed in 2.14.16?