[Gdal-dev] gdal_translate: using "-b" switch

Andrey Kiselev dron at ak4719.spb.edu
Sat Nov 15 03:04:00 EST 2003


On Fri, Nov 14, 2003 at 01:40:11PM -0800, Matt Wilkie wrote:
> http://www.remotesensing.org/gdal/gdal_utilities.html says:
> 
> 	-b band: Select an input band band for output.
> 	Bands are numbered from 1. Multiple -b switches
> 	may be used to select a set of input bands to
> 	write to the output file, or to reorder bands.
> 
> however when I use multiple -b's the output image only has one band. 
> This is the command line I'm using:
> 
> d:\> gdal_translate -b 5 -b 4 -b 3 Mosaic30m.tif out_543.tif
> 
> The input image has 6 bands.
> I'm using GDAL 1.1.8.0, released 2002/12/21 on Windows XP.
> Is my syntax wrong?

No, your syntax is right, but your GDAL distribution is wrong :-)
Support for multiple -b switches was added recently and manual pages
from the GDAL site document the current state of the GDAL development.
Take the daily snapshot or check out CVS repository to get that feature
working.

					Regards,
					Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



More information about the Gdal-dev mailing list