[gdal-dev] Some questions ...
even.rouault at mines-paris.org
Fri Feb 15 17:40:23 EST 2008
If you need to add a new band to a GeoTIFF dataset, the only solution that
comes to mind is to create a new dataset with N+1 bands, and copy the content
of the N first bands of the source datasets in it.
Le Friday 15 February 2008 23:23:28 Frank Warmerdam, vous avez écrit :
> mario beaulieu wrote:
> > GDAL version 1.5
> > I have 2 questions.
> > 1) I want to add a raster band to a GEOTIFF dataset. Is there any
> > method to do it since the driver seem not to support the AddBand method?
> > ERROR 6: Dataset does not support the AddBand() method.
> The AddBand() method is the correct method, but hardly any drivers support
> adding a band to an existing dataset. I suspect the MEM and VRT drivers
> are the only ones that currently support it.
> > 2) I want to create 1 BBP raster band and save it in TIFF. How can I do?
> Pass the creation option NBITS=1 to the GTiff driver Create/CreateCopy
> methods. Note, this may not work properly in pre-GDAL/OGR 1.5 versions.
> Best regards,
More information about the gdal-dev