I want to perform a simple calculation on a raster (.tif) file in QGIS3.22, but it is generating unexpected values in the output. The image below shows the "input" layer to the calculation.
I then use the "raster calculator" and enter the following options:
Clicking OK yields the following "temporary" layer:
I've tried various methods without success. I also used GDAL (Python) to read the .tif
file and edit it, but this is not a feasible long term solution. All the .tif
files have a single band and when I query the "input" layer in the regions of study, there is "no data" under these points. As a result I think that the raster calculator is incorrectly interacting with the missing data leading to "memory overflow". I've encountered similar looking numbers when examining unallocated memory with the C
programming language in the past (unrelated and integers instead of floats).
-3.4e+38
, which is a pain. Thanks for the suggestion.ERDAS IMG
format. I'm going to make a new question about this because the output was even more strange.ERDAS IMG
has solved the problem. Thank you. I'm not a hundred percent sure how stack exchange works but if you want to post an answer I will approve it.