Bug report #13297
Edited/Deleted features still in Shapefile
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | Digitising | ||
Affected QGIS version: | 2.10.1 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | duplicate |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21355 |
Description
Recently experienced an issue much the same as this previously closed issue (#11007) where a shapefile was edited, some features removed and others edited, saved and qgis closed.
The shapefile then loaded into ArcGIS online, and the deleted and modified polygon were visible.
When I reopened the file in qgis they look as they should. I opened the file in ArcGIS desktop and the deleted objects are still there and changes to shapes are lost.
Saving the shapefile as a copy did resolve the issue so that the file could be used in other applications.
Basically, the same behaviour as previously reported, but in the latest release version.
Related issues
History
#1 Updated by Saber Razmjooei about 9 years ago
- Priority changed from Normal to Severe/Regression
- Status changed from Open to Feedback
Which version of QGIS? Could you provide an example file?
#2 Updated by Jamie Portman about 9 years ago
- File Objects_in_QGIS.JPG added
- File Objects_in_AGOL.JPG added
- File Precincts.zip added
It was v2.10.1
I didn't have the file anymore - cleaned them up after resolving the issue.
However, I have been able to replicate the problem with the same original data.
#3 Updated by Jamie Portman about 9 years ago
It is by no means happening all the time.... just occasionally!
I am also having other issues where running an intersect process between to overlapping layers is dropping out some features on a random basis - and I can't seem to identify why - perhaps it is somehow all related??
#4 Updated by Saber Razmjooei about 9 years ago
- Operating System deleted (
Windows)
Does it happen with other layers or only this one?
In my experience, it usually happens to the layers with topological error. In your example, there are 2 overlapping features (id:4 and 11).
Try to test with a "clean" file and report back.
#5 Updated by Jamie Portman about 9 years ago
This is the only one I have noticed it with.... but then I'm not uploading all my layers into another platform such as AGOL to view!
It looks fine in when viewed in QGIS - it is only when it is opened elsewhere that the anomaly presents.
I ran "check geometry validity" and there was 1 duplicate node in an unrelated polygon. I deleted it and re-uploaded and the 'old' feature shapes are still visible in AGOL, so it has not resolved the problem.
I would not consider overlapping features to necessarily be a topological error! They could be, depending on what they are representing, but there are many reasons by a shapefile (or any GIS layer) may have overlapping features or gaps.
#6 Updated by Jamie Portman about 9 years ago
- File Precincts_-_v282edit.zip added
I just performed another test...
I made a copy of the troublesome Shapefile in file explorer (I did not do a save-as in QGIS as that seems to resolve the issue).
I then opened the shapefile in QGIS v2.8.2. I made some very small changes to the shape of ONE of the two polygons that had the issue, saved my edits, reloaded into AGOL and now it looks exactly as it should (and as it does when view in QGIS) for BOTH the polygons (one of which I made no changes to.)
I have uploaded the file edited in v2.8.
#7 Updated by Jamie Portman about 9 years ago
- File Precincts.zip added
I have made exactly the same changes in v2.10 to the original file as those I made in v2.8.2 to the copy.
In QGIS it only sees 1 object in QGIS, but when I upload to AGOL (or open in ArcGIS) there are two objects there (the original and the edited one) - FID37 and FID39.
The original edit was done by cutting the object out of the layer and then pasting it back in (to get it to respect the 'avoid intersection') rule.
It's like QGIS has flagged the old Feature (FID37) as deleted and now believes it is FID39.... but AGOL is seeing both.
I recall some other queries/bugs relating to the 'deleted' flag.
Whatever it is, v2.8.2 gets it right and v2.10 is having some issues!
#8 Updated by Saber Razmjooei about 9 years ago
I say it is a regression. I will check with dev, 2.10 and 2.8.
Could you also check with QGIS processing toolbox. For example my original bug, if I remove a feature and buffer it using SAGA, it will create a buffer of the deleted feature.
#9 Updated by Saber Razmjooei about 9 years ago
This affects the feature count. Deleted features still appear in feature count.
#10 Updated by Jamie Portman about 9 years ago
There are definitely two 'phantom' objects that remain in the table unless a save-as is done.
Simply by populating a column with $id, I can see that the count gets out of sync at the last two features.
I tried the SAGA Buffer in Processing Toolbox, however this actually results in only the first 13 features being buffered. I also tried a "Convert polygon/line vertices to points" and only the first 13 records have vertices created. I believe it may be stumbling across an issue with the 14th object and it simply stopping going any further, as I created a new feature in QGIS (a simple polygon with 4 vertices) and re-ran the buffer and vertices>points process and both results still stopped at the 13 feature...
However, even after deleting the 14th and all subsequent objects except the last one just added as a test object, it still fails to buffer the new test object.
But if I save-as the shapefile and buffer it, it works perfectly and buffers all features.
(All this testing has been done on the same shapefile uploaded in my previous update.)
If is provides any additional context information, many of the objects in our GIS layers are being extracted from DXF CAD files - thye appear to import through into the GIS format and copy/paste perfectly fine, but perhaps there is some underlying object issue that is somehow causing issues? We have recently had other objects that 'dissapear' when an intersect process is done - however all objects pass all the geometry validity checks...
#11 Updated by Saber Razmjooei about 9 years ago
- Resolution set to duplicate
- Status changed from Feedback to Closed
Please see the original ticket.