[Gdal-dev] How to access 2-D arrays returned by GDALRasterIO?
Christopher Barker
Chris.Barker at noaa.gov
Mon Jul 10 20:13:51 EDT 2006
Bruce Raup wrote:
> So my
> questions are:
>
> 1. Where is the documentation on CPLMalloc and related functions?
> 2. Do CPLMalloc or GDAL provide for ease of access into image data
> using 2-D indexing?
> 3. Or should I be using the list-of-pointers method for 2-D indexing
> as described in, say, Numerical Recipes?
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.
Indeed, there are python wrappers in progress that will use numpy arrays
by default, but I've been doing it by hand so far.
IF you really can't do Python, I'd look into Blitz++ or some of the
Boost libs for array classes you could use.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Gdal-dev
mailing list