I have a SAGA Raster Calculator algorithm inside a model that I'm building.
For the formula, I'm using the function
(g1>20)*1 to give me a binary raster output. This categorises pixels to buildings (1) or ground (0) depending on whether the altitude is 20m or more. This works as expected!
I can link this string expression into a string parameter in my model, and use this when I run my model.
For ease-of-use, I'd rather provide the threshold value of 20 as a numerical input value. So rather than
a string parameter "Minimum Height Expression" of "(g1>20)*1"
It would be something like
a number parameter "Minimum Height" of 20
And the expression inside the algorithm would be something like
Is token subsititution like this possible with Processing? Or is there another way to get around this?