Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapefile corrupted on edit #21317

Closed
qgib opened this issue Aug 24, 2015 · 8 comments
Closed

Shapefile corrupted on edit #21317

qgib opened this issue Aug 24, 2015 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Aug 24, 2015

Author Name: Spencer Gardner (@spencerrecneps)
Original Redmine Issue: 13256
Affected QGIS version: 2.10.1


I'm seeing some strange behavior on a shapefile I'm working with. If I draw a polygon in just the right spot and then save my edits, the polygon disappears. Any subsequent polygons that I draw and commit have the same problem. If I close QGIS, restart, and then add the same shapefile, the shape that I drew is visible, but seems to have issues. I can't always select it with the selection tool, for example.

I initially thought the issue might be that I was drawing shapes that were partially outside of the extents of the coordinate system of the projection on the shapefile, but if I draw other shapes far away from the other features and outside of the projection extents they draw and commit without problems.

A version of the shapefile that seems to be causing the problem is attached.

Steps to reproduce:
1 - Add test.shp to empty canvas
2 - Start edit session
3 - Draw new polygon at approximately the following coordinates (+/- 1,000 ft):
255902, 513277
415154, 514104
411018, 718443
290234, 698175
4 - Save edits

What happens:
Newly drawn polygon disappears. Shapefile is corrupted in some way. No errors to indicate that there was a problem.

What should happen:
Changes are rolled back and an error message is produced. Even better, QGIS handles whatever issue and the shape is committed as drawn.


@qgib
Copy link
Contributor Author

qgib commented Sep 13, 2015

Author Name: Saber Razmjooei (@saberraz)


QGIS doesn't seem to handle vectors with overlapping features properly and throws out some random errors when editing them.
Feature 4 and 10 in your shapefile contains some overlapping.

Could you remove those features and try again? Also, worth trying in QGIS master.


  • 9060 was configured as overlap.PNG
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2015

Author Name: Spencer Gardner (@spencerrecneps)


OK. More weirdness. When I delete features 4 and 10, commit edits, turn off editing, and then zoom, all features in the shapefile disappear. If I close QGIS, reopen, and add the modified shapefile to the canvas, I can see the features until I zoom again at which point they disappear. Same behavior in the latest nightly.

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2015

Author Name: Spencer Gardner (@spencerrecneps)


Additional request: Can we mark this for causing corruption?

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2015

Author Name: Spencer Gardner (@spencerrecneps)


Additional testing: I imported the shapefile to a PostGIS database and was unable to recreate the problem. It appears to be isolated to shapefiles.

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2015

Author Name: Saber Razmjooei (@saberraz)


Could you also save it as new shapefile and test?

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2015

Author Name: Spencer Gardner (@spencerrecneps)


I saved test.shp as test2.shp and then deleted features 4 and 10. The issue does not occur on test2.shp.

@qgib
Copy link
Contributor Author

qgib commented Sep 15, 2015

Author Name: Saber Razmjooei (@saberraz)


Could be related to this #21355

@qgib
Copy link
Contributor Author

qgib commented Dec 10, 2015

Author Name: Spencer Gardner (@spencerrecneps)


Thanks. Looks like this is part of the issue reported at #19349 (also connected with the issue linked above).


  • status_id was changed from Feedback to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant