Ömer, Is it really a new problem ? Looking at the history of the driver and the error message, I've the feeling it is not a new one.
You'd better open a Trac ticket and attach the dataset that causes the error. You could also check if you get the same issue with the dataset used in the GDAL automated test : http://download.osgeo.org/gdal/data/aig/nzdem.zip Best regards, Even PS : please avoid sending private email and add gdal-dev in CC. Le Sunday 14 February 2010 09:00:20 Ömer Özak, vous avez écrit : > Well, I'm importing and working on AIG grids. The process will work > sometimes and not others (even on the same file). It will give me an > error saying there is a corrupt block. Strangely it is always when I > issue the ReadAsArray() comand and it will say it is in X Block ref 36 > in all files. The nly thing that changes is the supposed number of bytes > it was expecting and the number it actually received. > > Since I upgraded to GDAL1.7 it tells me the following: > > ERROR 1: Block is corrupt, block size was 0, but expected to be 8192. > ERROR 1: IReadBlock failed at X offset 36, Y offset 2021 > ERROR 1: GetBlockRef failed at X block offset 36, Y block offset 2021 > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "utils.py", line 132, in <module> > File > "/Library/Frameworks/GDAL.framework/Versions/1.7/Python/site-packages/osgeo >/gdal.py", line 895, in ReadAsArray > buf_xsize, buf_ysize, buf_obj ) > File > "/Library/Frameworks/GDAL.framework/Versions/1.7/Python/site-packages/osgeo >/gdal_array.py", line 227, in BandReadAsArray > ar = numpy.reshape(ar, [buf_ysize,buf_xsize]) > File > "/Library/Frameworks/GDAL.framework/Versions/1.7/Python/site-packages/numpy >/core/fromnumeric.py", line 152, in reshape > return reshape(newshape, order=order) > ValueError: total size of new array must be unchanged > > Any ideas? > > On 2/13/10 6:53 PM, Even Rouault wrote: > > Hum, not sure to remember the issue you're talking about... > > > > Le Saturday 13 February 2010 20:56:54 Ömer Özak, vous avez écrit : > >> Hi, > >> > >> I read your postings about this problem being fixed. I'm getting a > >> similar issue when I import many ArcGIS binary grids using the AIG with > >> python. I upgraded to gdal 1.7.1 and the issue is still there. I've > >> opened the dataset in Arcgis and they work ok, so I don't think it is an > >> issue with the files. Do you know how one can solve this? > >> > >> Thanks _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev