Hi List,<br><br>  I have observed a puzzling behaviour of the reported extent of an ogr layer after geometries of features have been modified, with the file opened in update mode. I use gdal 1.7 via the pyhton bindings, open a dataset with ogr.Open(fname,update=True), then loop through layers and features and modify geometries like: <br>
geom=feature.GetGeometryRef(), new_geom=some_modification(geom), feature.SetGeometry(new_geom), layer.SetFeature(feature). However, ogr (and Qgis, which uses ogr for that I suppose) reports the new layer extent as, the &quot;minimal bounding box&quot; of the new and old extents. So somehow, the extent before geometry modification is still stored somewhere in the dataset. The same observations also hold for a dataset which is modified by hand using the editing tools in Qgis! Consider the following ogrinfo output from a file with one layer, containing one point:<br>
INFO: Open of `qgis_test.shp&#39;<br>      using driver `ESRI Shapefile&#39; successful.<br><br>Layer name: qgis_test<br>Geometry: Point<br>Feature Count: 1<br>Extent: (0.077586, 0.577586) - (10.670690, 31.805172)<br>Layer SRS WKT:<br>
GEOGCS[&quot;GCS_WGS_1984&quot;,<br>    DATUM[&quot;WGS_1984&quot;,<br>        SPHEROID[&quot;WGS_1984&quot;,6378137,298.257223563]],<br>    PRIMEM[&quot;Greenwich&quot;,0],<br>    UNIT[&quot;Degree&quot;,0.017453292519943295]]<br>
test: String (80.0)<br>OGRFeature(qgis_test):0<br>  test (String) = nothing<br>  POINT (10.670689655172414 31.805172413793112)<br><br>Even though the point clearly lies at (10.67,31.80) the previous position is still included in the extent. Is this a bug or is there some reasoning behind this behaviour?<br>
<br>Best Regards,<br>Simon. National Survey and Cadastre of Denmark<br><br>