Is it possible to round raster value in QGIS to a given number of digits? I have raster data with temperatures as values but the authors have made the values Celsius * 10. That is, a temperature of 2.5 is stored as 25. When I use the following formula in the Raster Calculator:
"july_merged@1" * .1
…the result is 2.599999904632568. I just want the 2.5.
Best Answer
As an alternative, you can use in QGIS the gdal.calc module located in : Processing toolbox > GDAL/OGR > GDAL - Miscellaneous > Raster calculator
The details of the function used comes from numpy array functions :
This way, you can master the way the values are rounded. See below the result.
In a commandline way :