[Gdal-dev] Block size consistency

Frank Warmerdam warmerdam at pobox.com
Wed Feb 7 02:42:22 EST 2007


Ozy Sjahputera wrote:
> If we have a multi-channel image, is it safe to assume that the block 
> height and width are the same for all channels?
> 
> e.g.
> 
> suppose DS is a (GDALDataset*) of a 4-channel image, then
> int widthi, heighti, widthj, heightj;
> (DS->GetRasterBand(i))->GetBlockSize( &widthi, &heightj );
> (DS->GetRasterBand(j))->GetBlockSize( &widthi, &heightj );
> 
> are widthi == widthj and heighti == heightj for all i != j ?

Ozy,

This would *almost always* be true, but there can be exceptions.  You
will have to decide how risk averse you are.

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