13

How can I show raster pixels with NoData value in QGIS?

In ArcMap there is a button to choose the color for the NoData value. Is there something like this in QGIS?

enter image description here

1
  • Please change the accepted answer.
    – jpmc26
    Commented Oct 17, 2018 at 1:58

2 Answers 2

21

You can display raster NoDataValue in LayerProperties / Transparency tab by unchecking the "No data value" checkbox and "adding values manually" to the "transparent pixel list" table (green plus sign). After adding a value one need to change the "Percent Transparent" column to zero. After Applying this you can see the padded values as black.

4
  • 1
    Worked for me. In the Transparency Tab, Transparency band must be set to none, then untick the nodata value, then copy it into the From and To columns of the Transaprent pixel list. Set its transparency to 0. Then go back to Style and add the NoData value to the colour table.
    – obrl_soil
    Commented Nov 16, 2016 at 0:11
  • Doesnt work for me
    – user32882
    Commented Mar 21, 2019 at 10:11
  • Nor me. nodata is greyed out regardless of other settings. Using the additional no data field blanked everything except the nodata.
    – user24007
    Commented Oct 12, 2021 at 1:06
  • I suspect my problem involves a grid null value so big it cannot be used by QGIS (~2 x 10 ^ 34).
    – user24007
    Commented Oct 12, 2021 at 3:37
1

If you are having trouble displaying no data values, try using a Render Type of either Singleband Pseudocolor or Paletted/Unique Values. The Render Type that you choose needs to support adding cell values in order to be able to add the no data value. These two Render Types allow for adding cell values.

If using an Interpolation Type of Discrete, the no data value may need to be changed in the Value / Color / Label section to be slightly different from the actual no data value. For example, if your no data value is -999.99, try changing it in the Value / Color / Label section to -999.98. Seems like a bug, but perhaps I am not understanding.

The above was done in QGIS version 3.16.4 (Hannover).

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.