When I process a raster in QGIS it creates a second band. It appears that the band has no useful data. I like to use the Raster Colours Tool and it will not accept a raster with anything more than one band.
How do I remove the extra band?
When I process a raster in QGIS it creates a second band. It appears that the band has no useful data. I like to use the Raster Colours Tool and it will not accept a raster with anything more than one band.
How do I remove the extra band?
select in Toolbox: Rearrange bands. And remove band
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.
Try "GDAL miscellaneous raster calculator". I had the same problem. In the dialog box choose the raster file for the A band, and leave the other band as not selected. In the calculation gdalnumeric command text box type A*1. The raster file created will have only one band.
You can just use QGIS raster calculator:
Expression: "my_raster@1"
Click current layer extent
and save as a new single band raster.