[Qgis-user] Working with second band of two-band GeoTIFF

Alex M tech_dev at wildintellect.com
Mon Jun 24 08:52:23 PDT 2019


On 6/23/19 11:11, Fielding, Eric J (329A) wrote:
> I only recently switched to QGIS 3, so I am not sure whether I am missing something that was moved to a different place or the handling of raster layers changed. I am using 3.6.0 on a Mac. I have a two-band GeoTIFF image, and I want to run the Raster Calculator on the second band of the image. When I open the Raster Calculator, it only shows me band 1 of the image (image_name at 1). I tried forcing it to use band 2 with @2, but that did not work. I looked at layer Export->Save As and I don’t see a way to save the second band there. I finally went to the terminal and used “gdal_translate -b 2” to save the second band to a separate file. In QGIS 2, it showed me the two bands of the image in the Raster Calculator. Is there a way to do this inside QGIS 3?
> 
> Thanks,
>                 ++Eric
> --
> Eric Fielding
> NASA Jet Propulsion Lab
> Pasadena, California, USA
> 
> 

Eric,

Can you provide a sample 2 band raster file?
Also what does the Information tab in the layer Properties show (should
be similar to gdalinfo)?

I'm wondering if it thinks your 2nd band is an Alpha/Mask layer and
treats it differently.

Thanks,
Alex


More information about the Qgis-user mailing list