I'm quite new in the GIS business and I do not figure out how to do the following thing:

I have two geoTIFF Files, one is a 3+1 bands file (RGB+alpha), the second one is a DEM geoTIFF file containing one band with elevation data.

For a certain application, what I need is a 1+3+1 bands geoTIFF, containing the elevation Data on the first band, and the optical data plus the alpha info in the 2nd to 4th bands.

How can I join or add bands from different geoTIFF's using QGIS, for instance?

I have found a similar question as Adding band to existing GeoTiff using GDAL?, but there does not seem to exist a definitive answer there.

1 Answer 1



gdalbuildvrt fiveband.vrt -separate dem.tif threebandalpha.tif
gdal_translate fiveband.vrt fiveband.tif

If you application uses GDAL, you can just open the vrt.

  • Hello and thanks for the quick answer. If the commands above are to be carried out on a command line basis, then where can I find the gdal programs having QuantumGis installed on a win 7 system? Is there also a UI for this commands within Q-Gis? Thank you in advance!
    – Patribus
    Dec 26, 2013 at 19:07
  • Patribo, I can't verify with my installation, but it looks like the GDAL Tools plugin: qgis.org/en/docs/user_manual/plugins/plugins_gdaltools.html Has both tools.
    – user10353
    Dec 26, 2013 at 19:34
  • The merge function for raster does the trick. You just have to check the option to separate the bands in the new TIF instead of merging them. my only problem is that the alpha band in the original RGB TIF, which I suppose are responsible for describe nodata regions of the layer, does loose its function in the new generated TIFF file. Someone does have an idea about how to activate the alpha channel also in the newly generated files?
    – Patribus
    Jan 9, 2014 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.