Select to view content in your preferred language

Creating a new raster dataset with mixed bands programmatically

618
0
10-19-2010 08:54 AM
StevePiche
Emerging Contributor
Hi all,

Does anyone know how to programmatically create a new raster dataset with
bands of different types?

Using the IRasterWorkspace2 interface, I can create a new raster dataset,
however the band type must be specified and all the bands will have the
same type.

I tried changing the band type for single band within the dataset using the
put_PixelType method (from IRasterBand), and specifying a type different then
the one used to create the dataset. However this fails.

I tried create an empty raster dataset ( 0 bands) which fails too.

I also tried creating raster dataset with 1 band, and get a band refence from
another raster dataset and add that band to my new raster dataset. This fails
since the AppendBand method (IRasterBandCollection) is only valid for an
IRaster and NOT an IRasterDatset.

Thanks in advance...
0 Kudos
0 Replies