I am trying to build a custom script using things I have learned from this post: Number inputs as raster calculator variables in QGIS Modeler
This is my script so far:
##Maechtigkeit unterhalb einer Hoehe=name
##Input_Raster=raster
##Hoehe = string 28.65
##Rasterout = output raster
outputs_SAGARASTERCALCULATOR_1=processing.runalg('saga:rastercalculator', Input_Raster,[],'a - Hoehe',0,False,7,Rasterout)
But I always get the error
name 'Rasterout' is not defined See log for more details
When omitting the Rasterout parameter and type None
instead, it seems to run through but doesn't give me the temporary layer I need? So nothing happens really.
Is there another option for the last parameter? I tried consulting the SAGA documentation but it doesn't yield the information I need.
Also I need that output raster to do more raster calculations on.
How would I be writing that? Can I just rewrite the line:
outputs_SAGARASTERCALCULATOR_1=processing.runalg('saga:rastercalculator', Input_Raster,[],'a - Hoehe',0,False,7,Rasterout)
and use Rasterout instead of Input_Raster? And define a new Output variable'?