I'm using GRASS 7.4.1 in QGIS 3.2 and would like to change 0 values of a slope raster to 1. I've been following this video tutorial and my r.mapcalc function looks exactly the same. However the output adds 1 to all values in the slope raster. The model looks like this in the GUI:
And the formula in the output reads "slope_1 = ((slope+((slope==0)+1)))"
How can I convert only 0 values to 1 instead of adding 1 to all values? In ArcGIS raster calculator I would use something like Con(raster==0,1,raster)
Stripping the GRASS r.mapcalc function back further the output from this created a raster with original 0 values converted to 2 and all other values converted to 1:
I am aware there are other methods I could use to achive the same results but part of the purpose of doing this is to learn how to use the r.mapcalc GUI and so I am only looking for answers that use r.mapcalc GUI. Specifically I'd like to know why the formula / model used isn't behaving as expected and if another formula / model would be better suited to the problem.