How do I fix shapefiles after deleting and recovering them?

08-16-2016 09:55 AM
New Contributor

I've got all my data on a memory stick and accidentally deleted several weeks worth of work. I used an online service to recover the deleted files but when I add them back into ArcMap (10.4), they don't look how they're supposed to (most polygons are missing and there's a popup window saying "there was a problem drawing the shapefile. Drawing aborted." 

I'm looking through the files and appear to be missing the .sbx and LOCK files for each polygon, compared to my files that weren't deleted. Is this what's corrupting the whole thing? How can I fix this?

Please, in the simplest of words help me.

0 Kudos
4 Replies
MVP Honored Contributor

Don't worry about the LOCK files. The sbx isn't a mandatory file (see here). I'd try making a copy and deleting everything but the mandatory files and see what happens. Also, try opening in different software (e.g. QGIS), which can sometimes open otherwise corrupt files.

MVP Esteemed Contributor

Shapefiles are made up of at least three files: <name>.shp, <name>.dbf  and <name>.shx: The .shp is the geometry, the .dbf contains the attributes, and the .shx  is an index file that connects the two, making sure that  the correct geometry is connected to the correct dbf record.

<name>.sbn and <name.sbx> are spatial index files, and in the words of wiki "...are used by spatial databases (databases which store information related to objects in space) to optimize spatial queires Conventional index types do not efficiently handle spatial queries such as how far two points differ, or whether points fall within a spatial area of interest....  (see Shapefile - Wikipedia, the free encyclopedia )

Two tools that might help:  Check Geometry—Help | ArcGIS for Desktop  and Repair Geometry—Help | ArcGIS for Desktop .  Hope fully they can help you restore what you've lost.

That should just about do it....
MVP Legendary Contributor

and the link from a few months ago with the shapechecker in the zip file in this question 

0 Kudos
New Contributor