Bug report #12985

Shapefile: The length of real type field is reduced by 1 every save

Added by Minoru Akagi almost 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Jürgen Fischer
Category:Data Provider/OGR
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21063

Description

I just ran my QGIS tester plugin, and saw two test failed. Both tests are about input/output of shapefile and they are almost same. They load a set of shapefile and save it to another file set and examine whether the both file sets are identical. The result says that output dbf is not same as input dbf.

I looked at the shapefiles in QGIS, and saw that the length of real type field of output shapefile is less than that of the input by 1.

       length, precision
Input : 7, 2
Output: 6, 2

In addition, I saved the output shapefile to another shapefile and then the length of the real type field decreased to 5. This is real problem!

Test data (shapefile): https://github.com/minorua/QGISTesterA/tree/master/tests/data

QGIS master 2798ab0. With QGIS 2.8.2, no tests fail.


Related issues

Related to QGIS Application - Bug report #11755: Real precision (Shapefile) Closed 2014-11-28

Associated revisions

Revision 513cfad2
Added by Jürgen Fischer almost 9 years ago

vector file writer: adapt to 2fcbc8b (fixes #12985)

Revision c9803324
Added by Jürgen Fischer almost 9 years ago

ogr provider: increase width by one for decimal point if precision is given
(fixes #11755, fixes #12985)

(cherry picked from commit 2fcbc8b and 513cfad)

History

#1 Updated by Jürgen Fischer almost 9 years ago

  • Assignee set to Jürgen Fischer

#2 Updated by Jürgen Fischer almost 9 years ago

sounds related to 2fcbc8b

#3 Updated by Jürgen Fischer almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF