[Gdal-dev] How to access 2-D arrays returned by GDALRasterIO?

Bruce Raup brauplists at gmail.com
Tue Jul 25 00:03:27 EDT 2006


Hi Chris,

> Bruce, You're a Pythonista aren't you? You can pull a RasterBand out of
> GDAL and put it in a numpy array, and then manipulate it as 2-d data to
> your hearts content.

Good suggestion, but I've only scratched the surface in Python so far.
 So for this project, I'm writing in C.  I'm simply using the
array[i+num_x*j] style of indexing, which (I think) gcc optimizes for
anyway.

Cheers,
Bruce

-- 
Bruce Raup
http://cires.colorado.edu/~braup/



More information about the Gdal-dev mailing list