Tom,<br><br>GDAL/OGR updates the shapefile along with the dbf file when a feature is changed. That means updating the extents according to the geometries in the changed features. My guess is that there is a problem reading a feature&#39;s geometry extents.<br>
<br>Call the OGRGeometry::getEnvelope method on each geometry and check if the OGREnvelope::MinX and OGREnvelope::MinY values are within the expected extents. You can isolate the problem this way.<br><br>Otherwise, put together a sample dataset and create a new ticket at <a href="http://trac.osgeo.org/gdal/newticket">http://trac.osgeo.org/gdal/newticket</a><br>
<br><div class="gmail_quote">On Wed, Aug 4, 2010 at 10:00 PM, Tom Jeffery <span dir="ltr">&lt;<a href="mailto:tjeffery@gmail.com">tjeffery@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Chaitanya,<br>
<br>
The updated file is read properly with ogrinfo.  The only difference between<br>
ogrinfo -al between the two, besides the new field that was created, is the<br>
extent, which looks like this:<br>
<br>
Original file:<br>
Extent: (1528126.013001, 45899.818172) - (1542444.478012, 61468.662925)<br>
<br>
Updated file:<br>
(-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000,<br>

-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000)<br>

- (1542444.478012, 61468.662925)<br>
<br>
That...is a really large negative number!  Any idea why it might be getting<br>
blown up?<br>
-Tom<br>
<div class="im"><br>
<br>
Chaitanya kumar CH wrote:<br>
&gt;<br>
&gt; Tom,<br>
&gt;<br>
&gt; Can you check the destination shapefile with &#39;ogrinfo&#39; and see if it<br>
&gt; works?<br>
&gt; If ogrinfo gives a valid output of the new file, check with &#39;ogrinfo -al&#39;<br>
&gt; and compare it with the old file&#39;s output.<br>
&gt; ( <a href="http://www.gdal.org/ogrinfo.html" target="_blank">http://www.gdal.org/ogrinfo.html</a> )<br>
&gt;<br>
</div><div class="im">&gt; --<br>
&gt; Best regards,<br>
&gt; Chaitanya kumar CH.<br>
&gt; /tʃaɪθənjə/ /kʊmɑr/<br>
&gt; +91-9494447584<br>
&gt; 17.2416N 80.1426E<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gdal-dev mailing list<br>
&gt; <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
&gt;<br>
<br>
--<br>
</div>View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/gdal-dev-Editing-attributes-with-ogr-causing-corrupt-shapefile-tp5372483p5373236.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/gdal-dev-Editing-attributes-with-ogr-causing-corrupt-shapefile-tp5372483p5373236.html</a><br>

<div><div></div><div class="h5">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>