[Gdal-dev] pabydata declaration in GDALRasterBand::ReadBlock documentation

Tim Sutton tim at linfiniti.com
Mon May 31 04:46:23 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I have been going through the documentation & examples in 
GDALRasterBand::ReadBlock and am wondering what the declaration for pabyData 
is? It is used in the example but never declared (see below).

Many thanks


 CPLErr GetHistogram( GDALRasterBand *poBand, int *panHistogram )

 {
     int        nXBlocks, nYBlocks, nXBlockSize, nYBlockSize;
     int        iXBlock, iYBlock;

     memset( panHistogram, 0, sizeof(int) * 256 );

     CPLAssert( poBand->GetRasterDataType() == GDT_Byte );

     poBand->GetBlockSize( &nXBlockSize, &nYBlockSize );
     nXBlocks = (poBand->GetXSize() + nXBlockSize - 1) / nXBlockSize;
     nYBlocks = (poBand->GetYSize() + nYBlockSize - 1) / nYBlockSize;

     pabyData = (GByte *) CPLMalloc(nXBlockSize * nYBlockSize);


.
.
.
example continues...


Regards

Tim Sutton

- -- 
The only reason for time is so that everything doesn't happen at once 
 --Albert Einstein 

Get my public keys from:

http://tim.suttonfamily.co.uk/modules.php?name=Content&pa=showpage&pid=2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAuvDfWvXTJUo0BDoRAnAGAJ92bIjWbH4eNz/nD3vvK5vLJzWy4QCfXYGs
6f2oclNKZGyIWsGw4TlzTNY=
=MM1K
-----END PGP SIGNATURE-----



More information about the Gdal-dev mailing list