Bug report #18596

Data corruption on geojson field deletion

Added by Yury Ryabov over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:Even Rouault
Category:Data Provider/OGR
Affected QGIS version:2.18.17 Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26484

Description

Bug occurs when saving geojson file after deletion one or more fields in it. Instead of deletion of desired columns, only their names are deleted an not the data they had. Data in its turn is moved to the columns that are left, replacing existing data (to user it appears as columns that were supposed to be deleted were renamed and the columns that supposed to stay intact are deleted). So the attribute becomes totally corrupted.

Steps to reproduce:
1) Open geojson layer with at least two attributes
2) Enable editing on this layer
3) Open attribute table and delete one of the field (everything looks fine at this point)
4) Save changes
5 Behold attributes corruption in saved layer

Associated revisions

Revision 754018a4
Added by Even Rouault over 6 years ago

[OGR provider] When editing a GeoJSON file, close and re-open the file at end of editing session (fixes #18596)

Revision f68f288d
Added by Even Rouault over 6 years ago

Merge pull request #7145 from rouault/fix_18596

[OGR provider] When editing a GeoJSON file, close and re-open the file at end of editing session (fixes #18596)

History

#1 Updated by Even Rouault over 6 years ago

  • Assignee set to Even Rouault
  • Category changed from Editing to Data Provider/OGR

#2 Updated by Even Rouault over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF