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

Edited/Deleted features still in Shapefile #21355

Closed
qgib opened this issue Aug 31, 2015 · 11 comments
Closed

Edited/Deleted features still in Shapefile #21355

qgib opened this issue Aug 31, 2015 · 11 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality

Comments

@qgib
Copy link
Contributor

qgib commented Aug 31, 2015

Author Name: Jamie Portman (Jamie Portman)
Original Redmine Issue: 13297
Affected QGIS version: 2.10.1
Redmine category:digitising


Recently experienced an issue much the same as this previously closed issue (#19349) 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 issue(s): #19592 (relates), #21242 (relates), #21471 (relates)
Redmine related issue(s): 11296, 13180, 13422


@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2015

Author Name: Saber Razmjooei (@saberraz)


Which version of QGIS? Could you provide an example file?


  • priority_id was changed from Normal to Severe/Regression
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2015

Author Name: Jamie Portman (Jamie Portman)


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.


  • 9053 was configured as Objects_in_QGIS.JPG
  • 9054 was configured as Objects_in_AGOL.JPG
  • 9055 was configured as Precincts.zip

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2015

Author Name: Jamie Portman (Jamie Portman)


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??

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2015

Author Name: Saber Razmjooei (@saberraz)


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.


  • operating_system was changed from Windows to

@qgib
Copy link
Contributor Author

qgib commented Sep 10, 2015

Author Name: Jamie Portman (Jamie Portman)


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.

@qgib
Copy link
Contributor Author

qgib commented Sep 10, 2015

Author Name: Jamie Portman (Jamie Portman)


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.


  • 9057 was configured as Precincts_-_v282edit.zip

@qgib
Copy link
Contributor Author

qgib commented Sep 10, 2015

Author Name: Jamie Portman (Jamie Portman)


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!


  • 9058 was configured as Precincts.zip

@qgib
Copy link
Contributor Author

qgib commented Sep 11, 2015

Author Name: Saber Razmjooei (@saberraz)


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.

@qgib
Copy link
Contributor Author

qgib commented Sep 13, 2015

Author Name: Saber Razmjooei (@saberraz)


This affects the feature count. Deleted features still appear in feature count.

@qgib
Copy link
Contributor Author

qgib commented Sep 16, 2015

Author Name: Jamie Portman (Jamie Portman)


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...

@qgib
Copy link
Contributor Author

qgib commented Sep 25, 2015

Author Name: Saber Razmjooei (@saberraz)


Please see the original ticket.


  • resolution was changed from to duplicate
  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality labels May 25, 2019
@qgib qgib added this to the Future Release - High Priority milestone 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! Digitizing Related to feature digitizing map tools or functionality
Projects
None yet
Development

No branches or pull requests

1 participant