|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | Re: [gislist] Quick help |
| Date: |
08/10/2004 09:55:01 AM |
| From: |
Quantitative Decisions |
|
|
At 09:33 AM 8/10/2004 -0400, epoulsen@eden.rutgers.edu wrote: >I didn't save copies of the successfully saved shapefiles ... >Anyway the worst has happened: > > Number of shapes does not match number of table records > >Anyone ever successfully fix this? Is there some easy method I have been >ignorant of all these years?
Because shapefiles have become a kind of lingua franca of geographic data, this problem is not the sole province of ESRI software and therefore its solution--which anyone can undertake, regardless of their GIS software preferences--may be of general interest.
As a bit of background, you need to understand how the three parts of a shapefile work together. A shapefile is represented on disk as a dBase file (which contains the attributes), a .shp file (which describes the features), and a .shx file (which associates each dBase record with its feature in the .shp file). This error message indicates at least one of the three files is corrupted.
Usually the features are the most important information to recover, because creating them can require detailed labor and the attributes are often available elsewhere. When this is the case, there is indeed an easy fix. Create another shapefile having the same number of features. (Easy method: start with a copy of a large shapefile of the same topological type and delete the extra features. It's wise to delete all the dBase fields except for a unique identifier field, too.) Replace the original .shx and dBase files with the .shx and dBase parts of the new shapefile. If the original .shp file was ok, this surgically generated shapefile should be readable.
--Bill Huber Quantitative Decisions
_______________________________________________ gislist mailing list gislist@lists.geocomm.com http://lists.geocomm.com/mailman/listinfo/gislist
_________________________________ This list is brought to you by The GeoCommunity http://www.geocomm.com/
Get Access to the latest GIS & Geospatial Industry RFPs and bids http://www.geobids.com
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|