Sunday, 19 November 2017

Layer stacking rasters in QGIS?


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



Answer



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...