23

I have some multi-spectral data, where the individual bands are separate Raster files.

How do I layer stack these rasters so that I get one raster with 3 bands instead of 3 different rasters?

This is quite easy to do in ERDAS and ArcGIS, but I haven't figured out how to do it in QGIS

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Devdatta Tengshe
  • 41,311
  • 35
  • 139
  • 263

4 Answers4

24

I had the same issue some months ago.

Use gdal_merge to generate a new file from the 3 independent rasters.

In OSGeo4W command line you can do this:

gdal_merge.bat -separate -of GTiff -o output.tif input1.tif input2.tif input3.tif 

In QGIS you can do the same with a GUI in the raster plugin "merge" tool.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
vascobnunes
  • 5,570
  • 13
  • 49
  • 74
  • I had to enable the GDAL plugin as per Jehtom's answer below to get the Merge menu in the Raster Menu. After that it took hardly a few seconds. – Devdatta Tengshe Mar 26 '12 at 14:35
12

You could try "Raster -> Miscellaneous -> Merge" which is a front-end for GDAL's merge_raster.py. It's part of GdalTools plugin that you may have to enable from the "Plugins -> Manage plugins..." dialogue.

jlehtoma
  • 191
  • 4
8

Geoprocessing was moved to processing toolbar in QGIS 2.16, as you can see below:

enter image description here

enter image description here

ahmadhanb
  • 40,826
  • 5
  • 51
  • 105
3

For Ubuntu users, just change .bat for .py and quote the files with respective path

Go to the Terminal and write:

gdal_merge.py -separate -of GTiff -o "path/output.tif" "path/input1.tif" "path/input2.tif" "path/input3.tif"

Rodrigo E. Principe
  • 10,085
  • 1
  • 28
  • 35