I want to add a plain floating point value as a user input (model input) to a raster.

For example, I want to calculate +4.3 to each cell of the raster. I remember this can easily be done in ArcGIS using (I think it's called) MathAlgebra.

In QGIS, I cannot find how to achieve it. The raster calculator algorithm doesn't let me reference a single numerical input as can be seen from the screenshot.

enter image description here

Are there other algorithms I can use? I read in some qgis manual, that you should be able to reference variables from previous calculation outputs, but I have no idea how to do this with a single numerical value.

I use QGIS-2.2.0 Valmiera.


I updated to 2.8.2 and there is an option, that was also available in 2.2., which is described in the Calculator tool. You can refer to model values by referencing a variable.

enter image description here

I entered +a->float value in the formula field of my Raster calculator step. I am not sure if I got the point how to use it correctly.

I couldn't yet verify because of some error (might be a different problem with my model) the model did not run correctly.

  • Is there any reason not to update to 2.8.2 and try again?
    – Bernd V.
    Jun 14, 2015 at 17:14
  • 1
    No one that would prevent me from giving it a try. But this could be a serious one, once the model is finished.
    – ulrich
    Jun 14, 2015 at 17:34
  • Updated my question after upgrading to 2.8.2.
    – ulrich
    Jun 14, 2015 at 20:50


Your Answer

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

Browse other questions tagged or ask your own question.