[GIS] How to control band order generation in GDAL Merge

gdal-mergeqgis

I am trying to merge a total of 8 GeoTiff files (each one representing a single band) into a single TIF file using Gdal Merge in QGIS. The tool works, but does not allow me to select the order that these layers will be compiled in the output file.

This is problematic as the layer names are NOT conserved in the tool, and therefore it is difficult to tell one band from the other after merging (they are just named Band1, Band2).
I have also tried running this in the CMD (since in QGIS you cannot even try to control layer order), but I couldnt get gdal_merge.py to work. The same for running gdal_merge via PyQGIS.

Here is what I mean by not being able to select layer order in the interface:

enter image description here

The problem is the same across QGIS 2.14 and 2.18.

Best Answer

So one solution is in QGIS 3.0, where the exact same tool (GDAL Merge) allows to control the input layers' order by just dragging them above/below each other carefully. Oddly, if you drag a layer 'into' another it deletes it from the Multiple Selection box, so you must put it exactly between the layers you'd like it to appear.

Related Question