Ryan Lewis
2007-11-21 17:51:08 UTC
Hi,
I would like to read in an entire ENVI image into a GDAL Dataset, and
then, create a matrix the size of which is pixels X number of raster
bands
So each column of the matrix is a raster band of the image, and each
row is a pixel of the image. so the idea is I would linearize the 2d
raster band with something like the pixel at (x,y) in a particular
rasterband would be at the position
x*width + y in the column.
Apparently it is a really bad idea to try and read one value at a
time out of each raster band, so could someone just tell me the best
method for doing this.
(If you have the code already that would be cool, but it is not
necessary, just an outline of the best way to do this in GDAL would
be awesome).
Thanks,
- Ryan H. Lewis
I would like to read in an entire ENVI image into a GDAL Dataset, and
then, create a matrix the size of which is pixels X number of raster
bands
So each column of the matrix is a raster band of the image, and each
row is a pixel of the image. so the idea is I would linearize the 2d
raster band with something like the pixel at (x,y) in a particular
rasterband would be at the position
x*width + y in the column.
Apparently it is a really bad idea to try and read one value at a
time out of each raster band, so could someone just tell me the best
method for doing this.
(If you have the code already that would be cool, but it is not
necessary, just an outline of the best way to do this in GDAL would
be awesome).
Thanks,
- Ryan H. Lewis