[gdal-dev] Creating derived raster bands using python

Antonio Valentino antonio.valentino at tiscali.it
Thu Mar 5 08:53:25 EST 2009


Hi list,
I'm trying to create a *Derived* raster band in a virtual dataset.

All my attempts seems to fail:

>>> ds.AddBand(options={'subClass': 'VRTDerivedRasterBand'})

raises an exception while

>>> ds.AddBand(options='subClass="VRTDerivedRasterBand"')
>>> ds.AddBand(options=['subClass="VRTDerivedRasterBand"'])

give a wrong result:

$ cat test.vrt

<VRTDataset rasterXSize="100" rasterYSize="100">
  <VRTRasterBand dataType="Byte" band="1"/>
  <VRTRasterBand dataType="Byte" band="2"/>
</VRTDataset>


Where is the mistake?

Thanks

-- 
Antonio Valentino


More information about the gdal-dev mailing list