[gdal-dev] using ogrinfo to check for a valid shapefile

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Mon Nov 22 09:37:13 EST 2010

Hi list,

we were trying to use ogrinfo te check for the validity of a shapefile,
however this approach does not seem to work.

We changed the shp file to an XML file, and then ran ogrinfo on it,
ogrinfo will just report the normal info. Only when reading the actual
data we get back fread errors on the geometry:

ERROR 1: Error in fread() reading object of size 152 from .shp file
  OBJECTID (Integer) = 135
  C_SCHERMID (Integer) = 0

Is there any way around this? ESRI's shpinfo reports an error immediately:

[bart at nwr-iovl-geo002 bin]$ /opt/arcsde-9.3/sdeexe93/bin/shpinfo -f
Unknown system format
Unable to open
File not found or insufficient access rights

Using GDAL 1.7.2. TIA.

Best regards,

More information about the gdal-dev mailing list