TransWikia.com

Polygon geometry suddenly disappeared/deleted from shapefile in QGIS

Geographic Information Systems Asked on November 27, 2020

I was editing a polygon shapefile in QGIS (3.0.1) today when suddenly 966 out of 5382 polygons disappeared from the map. I had been changing attribute information in the table, cutting polygons, etc as I was going along and saving my shapefile regularly. The polygons are still in the attribute table (if I select all my polygons using a spatial selection and then inverse the selection, the lines with the missing polygons show up) but an error message (zoom failed, feature has no geometry, “le zoom vers l’entité a échouché, l’entité n’a pas de géométrie”) appears when I attempt to find those polygons. There was no spatial clumping to the lost polygons nor a common attribute.

enter image description here

Comparison of yesterday’s file (purple underlay) with today’s corrupted file (black hatched)

I can’t share the file because it is proprietary so I realize that it is limited what can be troubleshooted just on my description. I have the back-up in our server from end of last workday so I will have only lost one day of work but it is still frustrating.

2 Answers

Not sure if this is any help, but have you got the polygons categorised into colours etc in the properties panel. It happened on mine where i changed attribute but never had the new attribute in the category so manually added it and then it showed up.

Answered by Steve on November 27, 2020

Not really an answer but that's what I will do to diagnose such an error :

  • Verify the geometry and repair any error you find. (See this for zoom related disappearing polygon)
  • Made sure it's not a display issue (transparent symbol or no symbology) (Like @Steve said in his answer)
  • Check that there are no provider feature filter set (but if there are some you shouldn't be able to see the attribute of the missing polygon)
  • Get the geometry in WKT format to see if the geometry of the missing polygon has really been erased (and if so trying to understand why : arepolygon overlapping or could you have inadvertently selected some polygon...)

Also in the past I experience some problem when editing shapefile if the same shapefile layer was loaded several time. So if you use the same layer several time you may try to remove all copy but the one you are editing.

Answered by J.R on November 27, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP