2

I'm trying to add the Raster Calculator to a model I'm creating using the Processing Modeler of QGIS 2.6 Brighton. It does not allow me to add the normal Raster Calculator tool under Raster, so I tried using GDAL Raster Calculator tool but it only allows me to include 6 layers into the mathematical expression; I need to include 7 layers.

Is there any other way to add the Raster Calculator to the Model in which I can include all of my 7 layers into my mathematical expression?

2

There is also SAGA / Grid - Calculus / Raster calculator which should allow you to use your 7 grids directly in one expression. Please be aware with SAGA Raster Calculator the way to use your files in expression is g1, g2, g3...

If the only problem is that GDAL raster calculator allows you to work with only 6 layers then you can also break your calculation into 2 or more steps and chain raster calculator process. GDAL raster calculator itself can work with 26 letters (A-Z) but I don't see any option how to extend slots in the GUI of modeler.

Let's say you want to do:

SUM = A+B+C+D+E+F+G+H

You need to break it into:

  • SUM1 = A+B+C+D
  • SUM2 = E+F+G+H
  • SUM = SUM1 + SUM2

(Btw if you really want to get SUM, there is Grids sum under SAGA /Grid - Calculus together with some more simplified tools/algorithms)

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.