Repair Corrupted Shapefile

3309
7
11-24-2016 12:50 AM
Highlighted
New Contributor

Does anyone know why random mxds and shps go corrupt over time when they haven't been accessed in a period of years? For instance, you work on a project, create maps and data that are working fine, the project goes dormant for 2 years so the data sits on an external drive. Then when you try to bring it back up random files simply won't open. Is there any hope to recover those files?? Especially the attached one?

Reply
0 Kudos
7 Replies
Highlighted
MVP Esteemed Contributor

assuming the zip contains all the necessary parts of the shapefile, the shapefile repair in this link is one of the last ditch efforts 

https://community.esri.com/message/608310 

it will try to match the number of records in the *.dbf with the number of records in the *.shp.  If it works, it is usually a last line of defence and comes from a time prior recent Arc* software incarnations.

Highlighted
Honored Contributor

Hi Bhargav,

If I check the components of the shapefile, the PRJ and SHP.XML files have a different Modified Date than other files.

There is a chance that the individual PRJ file might have been modified outside a ArcCatalog/Any other GIS software session, which could have made the shapefile corrupt.

What's your view on the remaining corrupt shapefiles?

Also I tried a few possible solutions to repair the attached corrupt shapefile without any success. I hope you have an untouched backup of the data.

Highlighted
New Contributor

Hi Jayanata,

Tried by deleting prj file and xml file even with few tools such as Shapechk...but left with no positive result.

There is no backup data as such.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

the .prj and .shp.xml files are really text metadata files and would not cause the files to be unreadable. I would try copying the files to another folder (so you still have the originals) and deleting the sbn and sbx files are indexes and easily rebuilt if needed. The three absolutely required files are .shp, .shx, .dbf.

Highlighted
New Contributor

Tried the same as well  but didn't work out

Reply
0 Kudos
Highlighted
Honored Contributor

I will assume that the data is irrecoverable (rather irreparable). From now onwards, use File GDB or Enterprise GDB to store data (you know very well). They are considered more secure. Also import all the archived shapefiles to Geodatabase.

Just a Note: When you copy shapefiles anytime, use ArcCatalog. If you use Windows Explorer and do not select all the files for a shapefile, the shapefile will be corrupt and will not load.

Highlighted
Esri Esteemed Contributor

Unedited shapefiles are corrupted over time by filesystem integrity issues, not anything directly due to ArcGIS (or any other GIS software for that matter). If the disk has failed (subtly, at the block level), there really isn't anything you can do (short of going to an archive from before the corruption).  This same issue will corrupt all local filesystem objects, so using file geodatabase is not a solution to this problem.

- V