1

I found that several lakes in the GRanD database (global reservoirs and dams) are unable to be selected for editing like normal polygons, and they have no feature at all, although they are shown in the attribute table with three features: GRanD ID, area and Poly_SRC.

May I ask:

  1. Why are these polygons corrupted?
  2. How to fix them to be normal polygons that can be edited?

Image 1: one lake polygon with no feature shown: enter image description here

Image 2: the lakes shown in the attribute table with three features: enter image description here

Image 3: The GRanD ID of each lake cannot be shown as label for each of these 25 mysterious polygons: enter image description here

The shapefile is shared in this link.

5
  • Where is the data sitting? Is it still in a database? Can you export the data out to a local file and try edit that? Could it be that there is a read-only lock on the location the data is sitting? Commented Jan 22, 2019 at 6:28
  • Hi Keagan, I can edit other polygons on this vector layer of lakes, and also I can export the attributes of this layer as CSV file. So, I'm not sure if it is because the shape file is locked as read-only. Can you advise if there is such as setting for shape file, and how to unlock it in QGIS? Thank you.
    – oat
    Commented Jan 22, 2019 at 6:36
  • In ArcMap I would try running the "Repair Geometry" Tool. I am not 100% familiar with QGIS, but perhaps running the v.clean tool might help. I did a quick search and found this: gis.stackexchange.com/questions/167421/… Commented Jan 22, 2019 at 6:41
  • I tried the Geometry validator plugin, and the error message for each of these 25 polygons is "ring 0 not closed"... seems the geometry of the polygons is problematic...
    – oat
    Commented Jan 22, 2019 at 11:22
  • I tried the suggestion from the link below to fix the "ring x not closed" error. However, the polygon regenerated from the boundary line of the lake is still ghost shape..... Post : gis.stackexchange.com/questions/170942/…
    – oat
    Commented Jan 22, 2019 at 11:30

1 Answer 1

1

It looks like something wrong in the shapefile, it might be read only and cannot be edited. I changed the format of the vector file from shapefile to MapInfo Tab and it worked. I can select the polygon, edit the nodes as normal vector file, and add labels as you can see below:

Editing the files:

enter image description here

Labeling:

enter image description here

But when I save again the Tab file as shapefile it behaves as before (neither selection nor editing worked).

Solution is shown in the discussion below:"...save the shapefile as MapInfo Format from QGIS by right-click the layer -> Save as and choose MapInfo Tab Format. Then continue working with file in QGIS."

5
  • Thanks. I also found that these polygons are fine in ArcGIS. But once they are exported from ArcGIS and opened in QGIS, they became ghost shapes, again.
    – oat
    Commented Jan 22, 2019 at 11:19
  • @oat I am not sure if MapInfo Tab is an option for you, but exporting the files as MapInfo Tab from QGIS can solve the problem
    – ahmadhanb
    Commented Jan 22, 2019 at 11:25
  • Unfortunately, we don't have MapInfo in our lab...
    – oat
    Commented Jan 22, 2019 at 11:31
  • 1
    You don't need MapInfo, you can save the shapefile as MapInfo Format from QGIS by right-click the layer -> Save as and choose MapInfo Tab Format. Then continue working with file in QGIS
    – ahmadhanb
    Commented Jan 22, 2019 at 11:32
  • your suggestion solved my problem. You saved my day. Thank you.
    – oat
    Commented Jan 22, 2019 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.