[Gdal-dev] gdal_translate to select multiple bands?

Vincent Schut schut at sarvision.com
Thu Feb 13 12:08:33 EST 2003


Thanks for the confirmation.
easier to write a small program myself, then...
Did it already, actually :-) Not very generic, of course, but does exactly 
what I want, avoiding the hassle. Wonderfull thing, that gdal... :P

On Friday 14 February 2003 16:55, Frank Warmerdam wrote:
> Vincent Schut wrote:
> > Hi all,
> >
> > Am I right when I assume that gdal_translate cannot be used to extract a
> > selection of more then 1 band from an image? E.g. I have a 4 band tiff
> > and I want only bands 2,3,4, I cannot type 'gdal_translate -b 2,3,4
> > ...... ?
>
> Vincent,
>
> You are correct.  What you want can be accomplished (with some hassle) by
> converting to VRT format, editing the .vrt file to remove the first band
> and renumber the remainder to 1,2,3 and then converting that .vrt file to
> your desired output format.
>
> Best regards,

-- 
______________________________________
Vincent Schut (schut at sarvision.com)
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com



More information about the Gdal-dev mailing list