Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

When I process a raster in QGIS it creates a second band. It appears that band has no useful data. I like to use the Raster Colours Tool and it will not accept a raster with anything more than on band. How do I remove the extra band?

many thanks in anticipation...

share|improve this question
1  
What raster processing are you doing that creates the extra band? It sounds like it is generating a mask band. –  MerseyViking Apr 25 '11 at 13:37
    
I am using the new clipper tool in QGIS 1.7. It is a GDAL_TRANSLATE implementation as far as I know. I use a shapefile mask layer and a no data value of 0. –  BWill Apr 25 '11 at 14:46

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.