[GIS] Understanding raster custom transparency options (making null data 100% transparent) in QGIS

nullqgisrastertransparency

I have a raster with a large null area (see the solid black area in the image below). The "Band 1" value throughout this null area is -3.402823e+38.

Raster

I'm trying to make sense of the result of my setting the "custom transparency options" so that "Band 1" values from 0 to 0 are 100% transparent (see settings below). Please note that at no point am I making changes to the default Style properties of the raster.

Settings

As a result of these settings, the null area does become transparent but the rest of the raster now has strange banding (see result below). My expectation was that the only visual difference between the initial raster and the result raster would be 100% transparency in the null area.

Result

Am I missing something?

EDIT: Per request, here are the the Style settings:

Style settings

And I have set '0' as an Additional no data value, as shown below.

AdditionalNullData

I have further discovered that I achieve the same strange banded raster result even if I delete the custom 0 to 0, 100% transparency option. To achieve this strange banded raster, I only need to select "Band 1" as the transparency band as shown below.

Band1TransparencyBand

Best Answer

To set the transparency, all you have to do is what you did without setting the transparency band to band 1, i.e. leave it on "None"

For example, to make the ocean bathymetry transparent in this elevation layer:

The transparency tab of the QGIS layer properties panel

Set the range you want (0 - 0 in your case, -11000 - 0 in mine) and leave the transparency band alone.

The transparency tab of the QGIS layer properties panel with a pixel range set

Related Question