Bug report #8519
"layer stack" option in raster->miscellaneous->merge is badly named
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17275|
The "layer stack" option in raster->miscellaneous->merge should probably have a different name.
1.It does not correlate with the "-separate" option in gdal_merge command line
2.the "layer" term is a bit misleading in the sense that you are stacking "bands", not "layers" (which, in the case of grayscale images, are kind of the same)
3.It is unchecked by default, so it should "catch the eye" of the user in case he/she intends to merge bands instead of mosaicing.
Change "layer stack" to something like one of the following:
"use inputs as separate bands"
"merge as different bands"
"assign each input to a different band"
Real world issue:
I had a user complaint and reproduced the problem on a fresh qgis 1.8 windows installation on two different computers:
'raster->miscellaneous->merge' outputs a grayscale raster with only one layer (the last of the three layers selected)
command executed was:
gdal_merge.bat -of GTiff -o E:/output.tiff E:/camada1.tiff E:/camada2.tiff E:/camada3.tiff
Some weeks later I was preparing to file a bug when I had the idea of checking the "layer stack" option. The output was then correct.
Command executed was:
gdal_merge.bat -separate -of GTiff -o E:/output.tiff E:/camada1.tiff E:/camada2.tiff E:/camada3.tiff
I admit I should have seen that much earlier, but checking the help (link to gdal_merge manpage) I did not see any hint
that that was the option I had to enable.