Bug report #11031
Problem with layer ordering on GDAL Merge for QGIS 2.2 and 2.4
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19370|
On QGIS 2.0, if you use the GDAL Merge algorithm from the Processing toolbox, the same layer ordering shown on the layer list is shown in the algorithm's layer selection window, and that will be the final layer order for the stacked file. Rearranging the layers in the list will also change ordering in the selection window. On 2.2 and 2.4, the layer selection window shows the layers in a random order, and this bogus ordering stays the same regardless of changes in ordering on the layer list. Please see attached PDF for a visual example.
The result is that, when using the merge algorithm to stack layers (i.e. producing multiband rasters), the band order in the resulting stacked file is random. It becomes worse if you are merging multiple scenes (as I was for a time series of Landsat scenes), since each stacked result comes out with a different band order.