[Gdal-dev] GDALRasterIO

salah jubeh s_jubeh at yahoo.com
Sun Feb 19 10:34:08 EST 2006

Hi guys
  I would like dump the content of image into an array to do some processing; I was able to extract rows 
  But I want to extract the whole image band  how this can be done
  I used this code 
  nXSize = GDALGetRasterBandXSize( hBand );
  nYSize = GDALGetRasterBandYSize( hBand );
  pafScan = (float *) CPLMalloc(sizeof(float)*nXSize*nYSize);
          GDALRasterIO( hBand, GF_Read, 0, 0, nXSize, nYSize, 
                        pafScan, nXSize,nYSize,GDT_Float32, 
                        0, 0 );
  But still when I say pafScan[10,10] it give me the value of 10th pixel in the first row

Best Regard
Eng. Salah Al Jubeh




 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060219/bfa8e915/attachment.html

More information about the Gdal-dev mailing list