How could I convert values of 32767 to 0 using raster calculator in QGIS?
Nadia, I have used GDAL_Calc (python script) to change one value (or a range of values) into 0. This can be achieved because
False is 0 (
True is 1) on the conditional statement. The calculation is
Condition * Raster, where the condition is
True the output is the raster value, where it is
Falsethe value is 0.
Using the 3rd example:
gdal_calc.py -A input.tif --outfile=result.tif --calc="A*(A>0)" --NoDataValue=0
The conditional statement becomes:
gdal_calc.py -A input.tif --outfile=result.tif --calc="A*(A!=32767)"
Which is true wherever the raster is not equal (!=) to 32767.