3

I am looking to execute an equation in the QGIS raster calculator using multiple instances of exponential notation. The current format I am using is as follows:

.00005*exp (x,y)

Where x is the input raster and y is the exponent I am attempting to raise the raster to. I am getting the error of invalid expression, any guidance would be very helpful!

4

there isn't an exp() function in Raster Calculator, but there is a power/exponentiation operator (^).

Assuming you want the equivalent of python's pow(x,y) function, you could try

.00005*("raster1@1" ^ "raster2@1")

where raster1 and raster2 are your layer names. The @1 means 'band1'

The same operator can be used in GRASS' r.mapcalc algorithm although I've not tried that myself.

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.