[GRASSLIST:10315] Re: importing big ECW file with r.in.gdal

Martin Landa landa.martin at gmail.com
Wed Feb 15 11:01:09 EST 2006


Dear Frank,

first of all, thanks a lot for quick reply.

I have tried to select a sub window from the source image. A strange
thing happen, the channels do not match. Maybe I am doing something
wrong...

gdal_translate -of GTiff -projwin 12E 52N 19E 47N Europe\
Landsat742.ecw Europe\ Landsat742.tif

or

gdal_translate -of GTiff -projwin 12 52 19 47 Europe\ Landsat742.ecw
Europe\ Landsat742.tif

The red channel covers selected region, the others are shifted..., see
the pictures bellow

http://k153-85.fsv.cvut.cz/~martin/.../ecw2tif/

2006/2/15, Frank Warmerdam <warmerdam at pobox.com>:

> > The red channel seems to be correct, the others contain only value
> > '0'. During import process the following errors occurred:
> >
> > ERROR 1: IReadBlock failed at X offset 0, Y offset 141969
> > ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 141969
>
> Martin,
>
> I'm not sure why this is happening, though it seems most likely to
> be the ECW reader failing when it starts work on the second band for
> some reason.
>
> > I have also tried to convert ECW file to GTiff by using
> > gdal_translate, also without any success.
> >
> > gdal_translate -of GTiff Europe\ Landsat742.ecw /mnt/hdb2/Europe\ Landsat742.tif
> > Input file size is 141970, 141970
> > 0...10...20...30.ERROR 1: TryWinRasterIO() failed for blocked scanline.
> > ERROR 1: IReadBlock failed at X offset 0, Y offset 0
> > ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
>
> A 141970 x 141970 x 3 8bit file will be circa 60GB uncompressed.  TIFF
> files cannot be any larger than 4GB.  The error above is likely caused
> by GDAL trying to write a file larger than 4GB.

Yes, you are right, I forgot that there is the limit for GTiff format.

> You might want to try and translate to a format that supports large files,
> like Erdas Imagine, just to verify that the GDAL ECW reading is working ok.
>
> gdal_translate -of HFA Europe\ Landsat742.ecw /mnt/hdb2/Europe\ Landsat742.img
>
> If that works, then we know the data is not corrupt and that GDAL can
> read it.
>

I will try it.

> Does GRASS raster format support files larger than 4GB?   If not you will
> either have to downsample the image, or split it into smaller tiles.
>

As I know GRASS raster format supports files > 4GB(?)

Best regards, Martin




More information about the grass-user mailing list