Is there any way to set the pixel value 0 to nodata of a raster stack in the multiband rendering type in QGIS?

I remember that it is possible to check a box in arcgis for that, so maybe i just oversee it in QGIS?

It is pretty annoying to convert all 0 values to nodata just for the style.

The min value for the rgb bands should start at the real min and ignore the 0 values

enter image description here


You can set the transparency for the raster value of 0 (Zero) to 100%. You can do that using layer properties -> transparency as you can see below:

enter image description here

Then add values and write 0 For Red, Green and Blue colors and set the transparency to 100, which is the default.

You also nee to the change the display of the RGB colors as follows:

1- Zoom to the target area

2- Choose Mean -/+ standard deviation

3- Accuracy -> Check Actual

4- Load

enter image description here

  • still the problem with styling. I updated the question above to make it more clear. Do you have any suggestions?
    – Bennet
    Jul 12 '16 at 8:57
  • I updated my answer
    – ahmadhanb
    Jul 12 '16 at 9:00
  • but this anyway would set just a transparency to the 0 values but would not ignore it what results in wrong colors for an rgb image. Still the styling would start at 0 to max and not from the first value >0.
    – Bennet
    Jul 12 '16 at 9:06
  • I updated my answer again.
    – ahmadhanb
    Jul 12 '16 at 9:11
  • this doesnt answer my last comment. Still the min value of r g and b band starts at 0. The transparancy method just as the name indicates put a transparancy to the 0 values
    – Bennet
    Jul 12 '16 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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