3

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

5
  • You have to show and style manager window. This is very strange result
    – Frodo
    Commented Mar 25, 2018 at 19:29
  • Try typing 0 in Additional no data value.
    – Techie_Gus
    Commented Mar 25, 2018 at 20:55
  • I edited the Question in response to the above comments.
    – Mike E
    Commented Mar 25, 2018 at 23:49
  • 1
    I think your last line in the Edit is the perfect answer to your question. The band selected for Transparency band is treated as the alpha band (as in RGBA composite images) to control the transparency.
    – Kazuhito
    Commented Mar 26, 2018 at 0:31
  • I don't quite follow you. Which settings do you propose I alter so that the null/"no data" region is 100% transparent and the other values maintain their typical black-to-white coloring without the banding?
    – Mike E
    Commented Mar 26, 2018 at 2:06

1 Answer 1

5

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

1
  • (I'm pretty much telling you what @kazuhito was telling you above, just explaining in a little more detail.) Commented Oct 16, 2018 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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