[gdal-dev] How detect the BlockSize to make tiles of my dataset
to open it?
Frank Warmerdam
warmerdam at pobox.com
Wed Apr 20 13:33:32 EDT 2011
On 11-04-20 11:32 AM, Francisco José Reyes Peralta wrote:
> Dear friends,
>
> Using gdalinfo and my dataset i obtain the following data:
>
> *Size: 35000, 20000*
>
> *Pixel Size: 0.5, -0.5*
>
> *Band 1 Block = 35000x1 Type=Byte, ColorInterp=Red*
>
> *Overviews: 17500x10000, 8750x5000, 4375x2500, 2187x1250, 1093x625, 546x312,
> 273x156*
>
> *Band 2 Block = 35000x1 Type=Byte, ColorInterp=Green*
>
> *Overviews: 17500x10000, 8750x5000, 4375x2500, 2187x1250, 1093x625, 546x312,
> 273x156*
>
> *Band 3 Block = 35000x1 Type=Byte, ColorInterp=Blue*
>
> *Overviews: 17500x10000, 8750x5000, 4375x2500, 2187x1250, 1093x625, 546x312,
> 273x156*
>
>
> How can I recognize my optimal blocksize to open a 250 MB ecw file in TILES
> mode because if I read all the dataset I obtain an outofmemory exception.
Francisco,
I believe you will get the best performance reading it one scanline at a time
with all bands at once. There is a special optimized case in the driver for
this. But you would need to use the GDALDataset::RasterIO() method to read
all three bands at once instead of reading them each separately.
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