I can’t figure out how to do this in QGIS. I tried gdal and SAGA raster calculator in QGIS. Here is the situation: I have two raster for the same area in the same projection with the same extent and the same resolution.
Raster A (has integer values from 1 to 5)
Raster B (has values from 1 to 7)
The calculation should do the following: if a cell in raster B is >= 3, make the cell for raster A + 1. So the result should be the whole raster A, but cell values in raster A where raster B is bigger than 3 should be +1. My formula so far (for GDAL):
((A*(A>=3))+(B>=3))+(A*(A<3))
But the result is missing all values lower then 3. Anyone any suggestions?
(("RasterB@1" >= 3) * ("RasterA@1" + 1)) + (("RasterB@1" < 3) * "RasterA@1")
– Joseph Feb 2 '18 at 16:35