Monday, 9 May 2016

Rounding raster values in QGIS raster calculator?


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.





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...