Is there a way to loop raster calculator through a set of variables in QGIS model builder? (I realise I can do this in python)

  • What variables do you mean? Changing the formula in each loop? – Joseph Sep 29 '17 at 10:30
  • Yes, (my_raster@1 >= [value to change]) * my_raster@1 – manfromuncle Sep 29 '17 at 10:49
  • 1
    In your model, you can add a String parameter and set this as the Formula when you set up the Raster Calculator algorithm. Save the model then right-click it and select Execute as batch process. In the interface, you can define the number of loops, raster layer to use and the formula for each loop :) – Joseph Sep 29 '17 at 10:53

The model builder currently does not support loops.

As Joseph already commented, the alternative in Processing is to use the batch functionality.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.