[Gdal-dev] advice on multiple band formats

Gregory, Matthew matt.gregory at oregonstate.edu
Mon Mar 15 17:05:17 EST 2004


I am developing an app where it is important that I be able to write
Imagine and AI Grid formats (using the HFA and GIO drivers).  At
present, I am running a spatial model and writing data to a temporary
Imagine image.  At the conclusion I use CreateCopy() to write to the
desired format.  

If I want to write to AI Grid (which doesn't support multiple-band
images), is there a way of going directly from a multiple-band Imagine
image to multiple Grid images?  The approach I was going to take was to
create a std::vector of single-band Imagine files for temporary use.  If
the user wanted grids, this would be a straight-forward CreateCopy()
from HFA to GIO.  If the user wanted an Imagine file, the bands could be
stacked from the individual temp Imagine files.  I'm sure somebody has
dealt with this and come up with a much more elegant solution.

An ancillary question is whether it is better to use the MEM driver to
store the temporary information.  If this is the case, could someone
post a simple example of how the use this driver?  I'm not quite getting
it from the online example.

Thanks for any advice.

matt

Matt Gregory
Faculty Research Assistant
Department of Forest Science
Oregon State University
541.750.7285
matt.gregory at orst.edu

  



More information about the Gdal-dev mailing list