[Gdal-dev] gdal_translate error

Frank Warmerdam warmerdam at pobox.com
Sun Oct 30 23:52:44 EST 2005


On 10/28/05, Graham Davis <gdavis at refractions.net> wrote:
> Hi,
>
> I'm trying to convert some adf files to ascii (AAIGrid format).  I am
> using the following command line:
>
> ./gdal_translate -of AAIGrid
> ../../../home/gdavis/tserver/italia_geo_2/dblbnd.adf
> ../../../raid/tmp/gdavis/tserver/2/dblbnd.asc
>
> I get the following error everytime I try:
>
> Input file size is 76056, 62770
> 0...10...20.ERROR 1: IReadBlock failed at X offset 0, Y offset 3405
> ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 3405
>
> The adf files load fine in ArcMap.  The file is about 6.1GB when it
> dies, and I have plenty of space left on the drive.  I've ensured there
> is no LFS or large file problems on the linux system (as the 6.1GB file
> size should prove).  My guess is that gdal thinks the file is corrupted
> in some way, but since ArcMap is able to open it fine, I don't know how
> accurate that is.
>
> Does anyone have some ideas or input as to what might be causing this
> problem?  Thanks,

Graeme,

I see that the AIGrid reader is using the "small file" API for reading
arc/info binary grids.  This means it can only support files up to 2GB
in size which is likely what you are hitting.  The format internally
uses 32bit offsets for block offsets so even changing to use the large
file API will only allow for files up to 4GB.

I have commited changes to use the large file API, and have
re-tested with small files successfully.  I would encourage you
to try building the overnight snapshot and verify if it works with
your file.

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list