Bug report #11031

Problem with layer ordering on GDAL Merge for QGIS 2.2 and 2.4

Added by Thiago Silva over 6 years ago. Updated over 5 years ago.

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.

QGIS_bug.pdf (679 KB) Thiago Silva, 2014-08-09 03:43 AM


#1 Updated by Paolo Cavallini over 6 years ago

  • Category set to GDAL Tools

#2 Updated by Giovanni Manghi about 6 years ago

  • Affected QGIS version changed from 2.2.0 to master
  • Priority changed from Normal to Severe/Regression
  • Category changed from GDAL Tools to 94

#3 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

fixed in


the processing dialog to allow selection of (raster) layers now shows the same order as the qgis layer panel.

#4 Updated by Giovanni Manghi over 5 years ago

  • Category changed from 94 to Processing/Core

Also available in: Atom PDF