[GIS] Esri File Geodatabase The parameter is (or has) the wrong kind of geometry

arcgis-desktoperrorfile-geodatabase

One of my tools was having problems, during debug I encountered a new error based on FDO error codes:

Case -2147220982
    fKnownErrNum = "The object has been deleted and is no longer valid."

Attempting to edit the feature class in ArcMap:
enter image description here

Which suggests that the data editor (somehow) has inserted a geometry that isn't the expected PolyLineZ into the table.

I tried to remove the bad shape with a tool I wrote but on the line pFeature = pFeatCur.NextFeature I get this error message:

enter image description here

Theoretically it should be impossible to insert a row with an incorrect geometry into an Esri file geodatabase, which has me scratching my head and wondering, but academics aside the data represents capture time and I would like to salvage if possible what I can. So far I have tried Repair Geometry, my own tools (with obvious failure) and the usually reliable Export to XML workspace document – which returns a similar error to editing in ArcMap.

Has anyone experienced a similar issue to this and been able to redeem (even partially) the data?

Best Answer

Try this on a new numeric field

def isWrong(shp):
 try:  b=shp.firstPoint.X;  return 0
 except: return 1

-------------------------

isWrong( !Shape!)

and select records with 1. Note you can delete features using tool outside editing session.

If the outcome are 0s only, I afraid there something else, not a bad shape.

Related Question