[Shapelib patch] EOF-weirdness when deleting columns in .dbf
|Reported by:||berendsen||Owned by:||warmerdam|
|Severity:||normal||Keywords:||dbf, columns, delete|
Symptom: When deleting a column in a shapefiles dbf table, it leads to strangeness at the end of the dbf-file. Strangeness is always visible when looking at the file in Excel, but only sometimes in Libreoffice / OOo Calc (seems to be only when having deleted a LOT of columns).
(noticed this when a colleague had problems loading such a file into an propietary ArcGIS 9.x extension)
Steps to reproduce:
- Create shapefile
- Create some random points, lines or polygons
- Create and fill some random columns in the table
- Delete a column
- Check .dbf in Excel
(The attached .zip contains two shapefiles. 'dbf-test' is before the deletion of table column, 'dbf-test-afterdelete' afterwards)
Observed in version: GDAL/OGR 1.9.2 \ QGIS 1.9.0-326 / Windows (OSGeo4W-installer) GDAL/OGR 1.9.1 \ QGIS 1.8.0-5 / Windows (OSGeo4W-installer) Other systems not tested
Might be related to: RFC35 http://trac.osgeo.org/gdal/ticket/2671, especially the statement: "One downside is that after deletion of a field, the .dbf file is not truncated as there's no hook for truncation. However this doesn't affect overall functionality. "
Workarounds: Use the 'Save layer as' feature in QGIS or ArcGIS 10.
Change History (6)
comment:1 by , 9 years ago
|Summary:||EOF-weirdness when deleting columns in .dbf → [Shapelib patch] EOF-weirdness when deleting columns in .dbf|