[Gdal-dev] Combine multiple Tiffs into a single Tiff

Thom DeCarlo t.r.decarlo at larc.nasa.gov
Wed Oct 5 17:15:04 EDT 2005


Rob,
Someone else asked this quite a while back. Frank's response was:

>As long as the red, NIR and MIR are  the same size and for the same
>region you should be able to stack them with gdal_merge.py:
>
>gdal_merge.py -seperate red.tif nir.tif mir.tif -o stack.tif
>
>The -seperate flag means put each input into a seperate band.

But that didn't help me, since I didn't have python on my Windoze box.
Instead, I used "gdal_translate -of VRT" to create a *.vrt file for one of
the inputs. I then edited the vrt file to add the other bands (copied and
modified the <band> section). I then used gdal_translate to build a single
GTiff from the vrt file.

It was a bit roundabout, but it worked.

Thom
--
Thom DeCarlo
------------------------------------------------------
              Experience is a wonderful thing
It allows you to recognize a mistake when you make it again.


> -----Original Message-----
> From: Rob McCulley
> Sent: Wednesday, October 05, 2005 4:15 PM
> To: GDAL (E-mail)
> Subject: [Gdal-dev] Combine multiple Tiffs into a single Tiff
> 
> Hi,
> 
> I've got a Landsat image downloaded off of Geobase.  By mistake, I
> downloaded a version with each band of landsat info in a separate GeoTiff
> (I would rather have had the bsq file, I know how to deal with it).  Can I
> use GDAL to merge three of the bands into a single RGB GeoTiff?  If not,
> what is the best way to do this?
> 
> Thanks,
> Rob McCulley
> GIS Coordinator
> County of Vermilion River No. 24
> (780) 846-2244
> rmcculley at county24.com
> www.vermilion-river.ab.ca






More information about the Gdal-dev mailing list