<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GIS Tips &#38; Tricks &#187; shapefile</title>
	<atom:link href="http://www.aubreyrhea.net/gis/index.php/tag/shapefile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aubreyrhea.net/gis</link>
	<description>for ESRI&#039;s ArcGIS suite</description>
	<lastBuildDate>Fri, 01 Apr 2011 18:52:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Comparing attribute tables with Python</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2010/08/comparing-attribute-tables-with-python/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2010/08/comparing-attribute-tables-with-python/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 11:42:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[attribute table]]></category>
		<category><![CDATA[geodatabase]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[shapefile]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=412</guid>
		<description><![CDATA[Problem #1: You are merging layers that have different attribute table structures and you don&#8217;t want to lose any important information. Problem #2: You want to use Python to return a list of shapefiles that match a search phrase. Problem #3: You want to use Python to compare two lists and return the differences. The [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><strong>Problem #1: You are merging layers that have different attribute table structures and you don&#8217;t want to lose any important information.</strong></li>
<li><strong>Problem #2: You want to use Python to return a list of shapefiles that match a search phrase.</strong></li>
<li><strong>Problem #3: You want to use Python to compare two lists and return the differences.</strong></li>
</ul>
<p>The following will solve all three!</p>
<p>I learned a lot from taking <a href="http://training.esri.com/gateway/index.cfm?fa=catalog.courseDetail&amp;CourseID=50089911_9.x">Introduction to Geoprocessing Scripts Using Python</a>. When I returned to work, I got the grand idea that I was ready to write a script that would make one looming task more manageable.</p>
<p>As is always the case, the solution seemed easier in my head than it turned out to be when I sat down to write it. The ESRI course had given me just enough information to be dangerous. I had <em>most</em> of the pieces I needed to put together this puzzle, but not all. Those missing pieces are what I would like to share with you today.</p>
<p><strong>The Background</strong><br />
I had created a geodatabase feature class and I needed to append and bunch of shapefiles to it. All of these shapefiles had attribute tables that were close to each other, but not exactly alike. Some had extra fields. I needed to make a list of all of those extra fields so that I could add them to the feature class before I started loading shapefiles.</p>
<p><strong>The Solution</strong><br />
The Python arcgisscripting module has a ListFields() function that forms the basis of my solution. But before I could get to that point, I needed to make a list of the shapefiles whose fields I wanted made into a list.</p>
<p>Depending on your work flow, that might be all the shapefiles in a particular directory. For me, it was all the shapefiles in a particualr directory that matched a file name search phrase. One example: I wanted to merge together all the shapefiles that had &#8220;bridge&#8221; in the name. My teacher introduced us to the os.walk() function, but I needed to modify it slightly to do exactly what I wanted. Here&#8217;s how:</p>
<p><code># import modules and create the geoprocessor object<br />
# (some of these you won't use until later)</code><br />
<code>import arcgisscripting, os, fnmatch, sys<br />
gp = arcgisscripting.create(9.3)</code><br />
<code># returns a list of shapefiles in the specified folder<br />
# that match the specified search pattern</code><br />
<code><span style="color: #0000ff;">folder</span> = r"F:\StagingArea\shapefiles"<br />
<span style="color: #008000;"> pattern</span> = sys.argv[1]<br />
shpList = []</code></p>
<pre><code>for path, dirs, files in os.walk(folder):
     for filename in fnmatch.filter(files, pattern):
         shpList.append(os.path.join(path, filename))</code></pre>
<p>In my setup, the search <span style="color: #0000ff;">folder</span> is hard-coded and the search <span style="color: #008000;">pattern</span> is a variable that the user inputs. This worked for my purposes because I was searching through the same folder on a lot of different file names. Modify according to your purposes. Note: The search pattern needs to be in the form <em>*bridge*.shp</em>. You can use * wildcards and you need to put the .shp on the end.</p>
<p>The code so far has only created the list. To make it visible, use this:</p>
<pre><code>gp.AddMessage("Shapefiles returned:")
for shp in shpList:
     gp.AddMessage(shp)</code></pre>
<p>Both segments of code assume you will be running the script from within ArcToolbox. Use a print statement if you will be running it from within IDLE or PythonWin. Note that this list returns not just the shapefile names, but their full paths. This makes the list usable as input into the next function.</p>
<p>The code to create a list of attribute field names is pretty simple. Here&#8217;s how it looks for my single target feature class (the one I&#8217;m going to be appending everything to):</p>
<pre><code>targetLayer = sys.argv[2]
targetList = gp.ListFields(targetLayer)
targetNames = []
for field in targetList:
     targetNames.append(field.Name)</code></pre>
<p>To create a list of attribute field names for a list of shapefiles, you add another loop. Here&#8217;s how it looks using the shpList I created earlier.</p>
<pre><code>x = 0
fieldNames = []
for shps in shpList:
     fieldList = gp.ListFields(shpList[x])
     for field in fieldList:
          fieldNames.append(field.Name)
     x = x + 1</code></pre>
<p>Now we have two lists. The first list is all the field names in the target layer and the second list is all the field names in every layer we want to add on to the target. What we really need is the <em>difference</em> between these two lists. In other words: we need to know which fields appear in the second list and not in the first list.</p>
<p>That sounds pretty complicated, but guess what, you can do it with two lines of code:</p>
<p><code>diffList = [fname for fname in fieldNames if not fname in targetNames]<br />
diffList = list(set(diffList))</code></p>
<p>The first line compares the two lists. The second line&#8217;s list(set()) function removes any duplicates and alphabetizes the final list of differences.</p>
<p>Finally, to display your results:</p>
<pre><code>gp.AddMessage("Missing fields:")
for field in diffList:
     gp.AddMessage(field)</code></pre>
<p>My finished code does a few extra things, like:</p>
<ul>
<li>eliminating unmatching geometry types from the shapefile list</li>
<li>eliminating empty fields from the field name list</li>
<li>listing the field length and type in the final output</li>
</ul>
<p>Perhaps I will talk about those in a later entry. What I&#8217;ve shown here are the parts that were the most difficult to figure out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2010/08/comparing-attribute-tables-with-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Viewing Flood Zones in ArcGIS Explorer, Part 2</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2010/01/viewing-flood-zones-in-arcgis-explorer-part-2/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2010/01/viewing-flood-zones-in-arcgis-explorer-part-2/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 11:15:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[ArcGIS Explorer]]></category>
		<category><![CDATA[attribute table]]></category>
		<category><![CDATA[coordinate system]]></category>
		<category><![CDATA[DFIRM]]></category>
		<category><![CDATA[flood zone]]></category>
		<category><![CDATA[shapefile]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=226</guid>
		<description><![CDATA[This is a continuation of my last post about different ways to access flood zone data for the non-ArcGIS Desktop user. Method 4: DFIRM Shapefiles Digital Flood Rate Insurance Maps are available to download from FEMA for $10. They’ve offered a few free samples and Fairfax City happens to be one of them. The data [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This is a continuation of my <a href="http://www.aubreyrhea.net/gis/index.php/2009/12/viewing-flood-zones-with-arcgis-explorer-part-1/">last post</a> about different ways to access flood zone data for the non-ArcGIS Desktop user.</strong></p>
<p><em>Method 4: DFIRM Shapefiles</em></p>
<p>Digital Flood Rate Insurance Maps are available to download from FEMA for $10. They’ve offered a few <a href="http://msc.fema.gov/webapp/wcs/stores/servlet/info?storeId=10001&amp;catalogId=10001&amp;langId=-1&amp;content=productDFIRM&amp;title=DFIRM%20Databases&amp;parent=productInfo&amp;parentTitle=Product%20Information">free samples</a> and Fairfax City happens to be one of them.</p>
<p>The data comes in several formats including shapefile. ArcGIS Explorer can read shapefiles. However, it will not let you add them to your map unless they have a defined projection.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/failed.png" alt="" /></p>
<p>The shapefiles in the Fairfax City DFIRM that I downloaded didn’t have their projections defined. I would assume this is the case with all of them. Luckily, they tell you the projection in the metadata. And luckily, projections can be defined with a file you can create using any text editor.</p>
<p>To find the projection, open the _metadata file in the Document folder. If you scroll down about 2/3 of the way you’ll find the Spatial_Reference_Information section. The most important parts are the Grid_Coordinate_System_Name, UTM_Zone_Number, and Horizontal_Datum_Name. The Fairfax City DFIRM is in Universal Transverse Mercator (UTM) Zone 18, NAD 1983 datum.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/metadata.png" alt="" /></p>
<p>I used that information to have ArcGIS desktop create a projection definition file in the format used by all ESRI GIS software (including ArcGIS Explorer). It looks like this:<br />
<code>PROJCS["NAD_1983_UTM_Zone_18N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",<br />
SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],<br />
PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],<br />
PARAMETER["Central_Meridian",-75.0],PARAMETER["Scale_Factor",0.9996],<br />
PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</code><br />
All you need to do is copy and paste that text into a text editor, remove any spaces, then save it as a .prj file. The name before the file extension should match the shapefile you are trying to use. The main DFIRM shapefile is S_Fld_Haz_Ar.shp, the flood hazard zone areas. So the projection definition file should be called S_Fld_Haz_Ar.prj</p>
<p>If you don’t want to copy and paste you can <a href="http://www.aubreyrhea.net/gis/S_Fld_Haz_Ar.prj">download</a> it and put it the same folder with the shapefile.</p>
<p>FEMA uses UTM for all of its DFIRMs, but they do not always use the same datum. If you download a different one from Fairfax City, you will need to check the metadata for the UTM Zone Number and whether the datum is NAD 1983 or NAD 1927. If it’s NAD 1983, you can use the same text from above as a template to create your .prj file. Just change the two red areas to match what the metadata says:</p>
<p><code>PROJCS["NAD_1983_UTM_Zone_<span style="color: #ff0000;">18</span>N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",<br />
SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],<br />
PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],<br />
PARAMETER["Central_Meridian",<span style="color: #ff0000;">-75</span>.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</code></p>
<p>If it’s NAD 1927, use this template and change the red areas</p>
<p><code>PROJCS["NAD_1927_UTM_Zone_<span style="color: #ff0000;">17</span>N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",<br />
SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],<br />
PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],<br />
PARAMETER["Central_Meridian",<span style="color: #ff0000;">-81</span>.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</code><br />
(Remove any line breaks that I’ve entered for readability).</p>
<p>Now, Go to the Add Content button and select Shapefiles… Then browse to the ArcShapes folder and add S_Fld_Haz_Ar.shp. The shapefile starts out looking like this…</p>
<p><img src="http://www.aubreyrhea.net/gis/images/Start.png"></p>
<p> …which isn’t very helpful, but just wait. If you right click on the layer in the Contents window, you can change the symbol to something with edges. Now you will be able to see the flood zone borders.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/Edges.png"></p>
<p>And, if you right click on the layer again and this time bring up the Properties window, you will be able to select certain attributes to show as Popup Content.</p>
<p><a href="http://www.aubreyrhea.net/gis/images/Popup.png"><img src="http://www.aubreyrhea.net/gis/images/Popup_small.png"></a><br />
(click on the image to see full size)</p>
<p>When you open this dialog box, a list of all the available attributes will come up. You will be able to select which ones you want to appear in a little pop-up window whenever you click on a feature. I picked all of them. Then, in the bottom half of the box you can select one attribute that will appear whenever you hover over a feature with your mouse. I picked FLD_ZONE because this is the most important piece of information. Now, if I type the address of City Hall into the Find box and press enter, I have everything I wanted at the beginning.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/Everything.png"></p>
<p>There’s a “you are here” symbol, and if I mouse-over I see it’s located in Zone X (not Flood Zone). I can mouse over other areas to see where the nearest 0.2 pct annual chance flood hazard zone is. And if I click in the zone, I can get any more information that exists about it.</p>
<p>Knowing how to use shapefiles in ArcGIS Explorer opens up a world of information. You can watch a free basic overview of the software at <a href="http://blogs.esri.com/Support/blogs/esritrainingmatters/archive/2009/12/03/explore-arcgis-explorer-in-a-free-training-seminar.aspx">http://blogs.esri.com/Support/blogs/esritrainingmatters/archive/2009/12/03/explore-arcgis-explorer-in-a-free-training-seminar.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2010/01/viewing-flood-zones-in-arcgis-explorer-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using ET GeoWizards to enhance shapefile management</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2009/11/using-et-geowizards-to-enhance-shapefile-management/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2009/11/using-et-geowizards-to-enhance-shapefile-management/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:55:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[attribute table]]></category>
		<category><![CDATA[shapefile]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=135</guid>
		<description><![CDATA[This week I am writing about yet another plugin that has proven quite useful to me. I have only scratched the surface of its capabilities, but the few features I did try out, I found reasons to use over and over. The plugin is ET GeoWizards, developed by Ianko Tchoukanski, and available at http://www.ian-ko.com/ This [...]]]></description>
			<content:encoded><![CDATA[<p>This week I am writing about yet another plugin that has proven quite useful to me. I have only scratched the surface of its capabilities, but the few features I did try out, I found reasons to use over and over. The plugin is ET GeoWizards, developed by Ianko Tchoukanski, and available at <a href="http://www.ian-ko.com/">http://www.ian-ko.com/</a></p>
<p>This tool duplicates some of the capabilities already present in ArcGIS, however it makes them all available at the ArcView license level. This can be a real boon to people who don&#8217;t have ArcEditor or ArcInfo licenses. In addition, you might just prefer the way it handles things better.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/et.png" alt="" /></p>
<p>For example, my favorite function is the most basic: &#8220;Create New Shapefile.&#8221; I love it because it lets me create new shapefiles right in ArcMap! No need to disrupt my workflow to start up ArcCatalog and then drag the file into ArcMap so I can start editing it. When you initiate shapefile creation, it lets you chose a spatial reference based on your current map or other layers.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/newShape.png" alt="" /></p>
<p>Then, it lets you add attribute fields! This too would be a separate step doing it the ArcCatalog way.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/newShape2.png" alt="" /></p>
<p>Then, it dumps your new shapefile right into the Table of Contents, ready for you to start using it. This is so much more convenient that you will never want to go back to the old way. It alone is reason to get the plugin, but there is more.</p>
<p>My second favorite function is &#8220;Redefine Fields,&#8221; which lets you change the length of string fields, or the precision of number fields, in your attribute table. I have run into many cases where I needed my text fields to be longer, and this is the easy answer. The only way to increase field length otherwise is to delete the field and re-add it with different definitions. This is problematic if the field is already populated with data. You end up having to create &#8220;holder cells&#8221; and migrate the data back in.</p>
<p>This tool removes the need for all those intermediate steps. However, it does save the results into a new shapefile, instead of updating your existing shapefile. That isn&#8217;t ideal, but I think there&#8217;s no way around it. It is still a much simpler solution overall.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/redefine.png" alt="" /></p>
<p>My third favorite function is &#8220;Order Fields&#8221; which changes the order of the fields in your attribute table. There is no other way to do this. Sometimes, you want the most important information to be in front, especially if you have lots of fields to sort through. With ArcMap, you can drag fields to reorder them, but they snap back to their original position once you close the attribute table. This tool changes their order <em>for good</em>. Also, if you want to remove any fields while you&#8217;re at it, you can do so by leaving them over on the left side. Like &#8220;Redefine Fields&#8221;, it saves the results into a new shapefile.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/order.png" alt="" /></p>
<p>A couple other functions that I haven&#8217;t tried, but which look really good:</p>
<ol>
<li>&#8220;Generalize,&#8221; which reduces the number of vertices used to represent a polyline or polygon. Sometimes you will end up with a feature you need to change the shape of that has vertices packed so tightly you are going to be there all day dragging things. Problem solved!</li>
<li>&#8220;Shape to ShapeZ&#8221; conversion, which will add the Z dimension to a shapefile. Z values allow for the storage of elevation data. You can&#8217;t load Z-enabled data into non Z-enabled feature classes. You have to drill down into the Environment Settings in order to enable Z values. It&#8217;s tricky enough that I will probably <a href="http://www.aubreyrhea.net/gis/index.php/2009/11/enabling-and-editing-z-values/">blog</a> about it at some point. This looks to be an easier way.</li>
</ol>
<p>As I said above, I have only begun to explore the <em>free</em> ET GeoWizards functions. The registered version has even more capabilities. And, there are ET GeoTools for inline editing and ET Surface tools for working with raster elevation data. Plenty of reasons to see what&#8217;s at <a href="http://www.ian-ko.com/">http://www.ian-ko.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2009/11/using-et-geowizards-to-enhance-shapefile-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using shpchk to fix damaged shapefiles</title>
		<link>http://www.aubreyrhea.net/gis/index.php/2009/10/using-shpchk-to-fix-damaged-shapefiles/</link>
		<comments>http://www.aubreyrhea.net/gis/index.php/2009/10/using-shpchk-to-fix-damaged-shapefiles/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 11:55:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[shapefile]]></category>

		<guid isPermaLink="false">http://www.aubreyrhea.net/gis/?p=128</guid>
		<description><![CDATA[While I was working on this week&#8217;s blog entry, I opened an old MXD, and noticed that one of the layers in the table of contents had &#8220;gone bad.&#8221; The checkbox had grayed out and there was a red exclamation point beside it. This is a normal occurrence when a dataset gets renamed or moved [...]]]></description>
			<content:encoded><![CDATA[<p>While I was working on this week&#8217;s blog entry, I opened an old MXD, and noticed that one of the layers in the table of contents had &#8220;gone bad.&#8221; The checkbox had grayed out and there was a red exclamation point beside it. This is a normal occurrence when a dataset gets renamed or moved to a different location, and can be repaired by updating the link. But in this case, I hadn&#8217;t been moving any files around. I attempted to &#8220;refresh&#8221; the link, by re-pointing it to the same data source, but was stopped in my tracks by this error message.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/shapeError.png" alt="" /></p>
<p>Detour! I know a way to solve this problem, so this week, instead, I will be blogging about shapechk.exe</p>
<p><strong>Problem: You get a cryptic error message when trying to load a shapefile.</strong></p>
<p>Shapefiles sometimes get corrupted. The errors they produce as a result used to be even less descriptive than what you see above. But as that message states, it has something to do with there being more or less entries in the attribute table (dbf) than there are in the index of spatial geometries (shp). I don&#8217;t know how it happens, but I can tell you that it does happen often enough that you will encounter it eventually.</p>
<p>A long time ago, Andrew Williamson wrote a utility that he doesn&#8217;t support anymore, but still offers on the web at <a href="http://www.geocities.com/SiliconValley/Haven/2295/howto_shapechk.html">http://www.geocities.com/SiliconValley/Haven/2295/howto_shapechk.html</a> Note: GeoCities is <a href="http://help.yahoo.com/l/us/yahoo/geocities/close/close-01.html">closing</a> on Oct 26th (<i>tomorrow</i>). After that, you can get it at <a href="http://arcscripts.esri.com/details.asp?dbid=10806">ArcScripts</a>.</p>
<p>It still works. It may not solve all your shapefile problems, but, up to now, it has solved all of mine. It&#8217;s a standalone executable that you simply unzip and run. Then, you press the buttons starting with Shapefile&#8230; on the left.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/shx.png" alt="" /></p>
<p>Browse to your damaged shapefile, then press Build Shx. Shx is the shapefile index. It will generate a new one in case your old one was the problem. Next, Check DBF.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/dbf.png" alt="" /></p>
<p>This is the part where where it checks if the number of records in the dbf matches the number of records in the shp. If you lost your dbf entirely, it will build you a new empty one. You won&#8217;t have attributes but at least you will be able to see your shapes. In my case, the utility needed to insert 28 empty records into my dbf table to fix my shapefile.</p>
<p><img src="http://www.aubreyrhea.net/gis/images/dbf2.png" alt="" /></p>
<p>When I opened my MXD back up, everything was working again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aubreyrhea.net/gis/index.php/2009/10/using-shpchk-to-fix-damaged-shapefiles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

