[Gdal-dev] Is there a GetRasterBandasRGB?
Christopher Barker
Chris.Barker at noaa.gov
Thu Jun 29 18:10:39 EDT 2006
Hi all,
I've been starting to work with GDAL (mostly with the python bindings),
and I've been very impressed, it's a very nice piece of work. I'm
particularly thrilled with the BSB support.
What I need to do is be able to read any (ideally) form of
geo-referenced raster image that GDAL supports, and then get a 24 bit
RGB version of a given subset of the image.
I've found I can use GetRasterBand() to extract the data I want.
However, I found myself having to write different versions of the code,
depending on how the data was stored:
if is is a single band raster, with a ColorTable, I do one thing
If it's a three band raster, with RBG bands, I do another
etc.....
Those are the two I've supported so far, but then it downed on me that
my needs can not be unique! this must be a pretty common problem.
So the question is, have I missed a function that extracts a subsection
of the rasterdata, and converts it to RGB data for me? If it's not built
in to GDAL, has anyone written such a thing, and/or would this be the
kind of thing that you'd like to add, if I write it?
thanks,
-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