[gdal-dev] shp - inconsistent extent

Even Rouault even.rouault at spatialys.com
Wed Dec 3 02:44:30 PST 2014


Le mercredi 03 décembre 2014 11:23:15, Martin Landa a écrit :
> Hi all,
> 
> some shapefiles produced by my scripts based on GDAL library are hard
> to display in Esri ArcGIS. It complains something about "Inconsistent
> extent". Any idea what is missing in my script to avoid this warning?

Martin,

If your script only does CreateFeature() to build a shapefile from scratch, 
then it is really annoying that ArcGIS protests, and we should fix that. But no 
idea what would cause it.

If your script does edits with SetFeature() or DeleteFeature(), then the 
extent advertized in the shapefile might be larger than the actual extent of 
the shapes in it. I'm not sure how ArcGIS could detect that without iterating 
over the whole shapefile to make the comparison. If you're in that case, you 
can try issuing "RECOMPUTE EXTENT ON layername" with ExecuteSQL() / ogrinfo -
sql. See "Spatial extent" paragraph of http://gdal.org/drv_shapefile.html

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list