In QGIS, how do I remove a band from a raster?

Interesting. If you specify a shapefile as a mask, it uses gdal_warp, and automatically adds -dstalpha to the commandline options.

For now, you could copy the text that appears at the bottom of the dialog box, and paste it into a command line window, removing the -dstalpha option. But this isn't an ideal solution, so I suggest you file a ticket on the QGIS bug tracker to get it added as an option.

As an alternative but sticking with the command line, you could run gdal_translate on your two-band file, using the option -b 1 to just use the first band for the output.

Band control is definitely something worth having in QGIS I reckon, so it might be worth adding that to the bug tracker as a requested feature.

Tags:

Raster

Qgis