[Gdal-dev] ADF -> AAIGrid, "IReadBlock failed"

Frank Warmerdam warmerdam at pobox.com
Tue May 29 10:14:46 EDT 2007


Patrick Min wrote:
> Hello,
> 
> I've seen this error mentioned before on the list, and
> I've been digging in the gdal_translate source for a while now,
> but can't yet figure out what is going wrong.
> 
> This is the output I'm getting:
> Input file size is 51215, 33632
> 0...10...20...ERROR 1: Illegal block requested.
> ERROR 1: IReadBlock failed at X offset 0, Y offset 2520
> ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 2520
> 
> I'm finding that "psInfo" holds a variable "nBlocksPerColumn",
> which is set to 2520.
> As soon as I request a row beyond 4 times that value
> (i.e. I do gdal_translate -srcwin 0 10800 1 1, for example)
> (which should be possible because the input data has 33632 rows)
> it gives me the above error.

Patrick,

I can't see what would be going on here.  If the input file is AAGRID
format, and the file has 33632 rows, I don't know why nBlocksPerColumn
would be 2520.   I think you would need to make the file available for
this to be pursued - though it sounds painfully large.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list