QGIS – Removing Extreme Values from a Calculated Raster in QGIS

landsatqgisraster-calculator

I have a Landsat GeoTIFF with a multiplicative scaling factor of 0.01.

When I load the tif into QGIS and multiply the raster by 0.01 extreme values are created (see attached picture).

enter image description here

Looking at the calculated and source layer, it looks kike the extreme values are due to differing CRS between the Landsat and calculated layer:

enter image description here

I've tried to address this at the calculation stage, but without success. Equally, I've tried setting values below 0 to 'no data', and a variety of other suggestions found online but I can't get it to behave – none of the raster calc solutions works (normally QGIS says there is formula error and won't proceed).

The Landsat tif used can be downloaded from here.

Can you help?

Best Answer

I don't know why you say that "I have a Landsat GeoTIFF with a multiplicative scaling factor of 0.01" but, in your picture, you have a landsat 9 product with ID equals to:

LC09_L2SP_039035_20220703_20220705_02_T1

and, exhibited image (Las Vegas, Nevada), it is for ST_B10 band. In this case, for converting values to kelvin, the multiplicative scaling factor is 0.00341802 and the adding scaling factor is 149. So, conversion formula in raster calculator is as follows:

"LC09_L2SP_039035_20220703_20220705_02_T1_ST_B10@1" * 0.00341802 + 149

After applying above formula, I got result of following picture. There is not "extreme values" and surface temperature values (Kelvin degrees) are as expected. It can also be observed that there are not colored areas outside image (in your case red areas) reflecting correctly no data values.

enter image description here

Related Question