# Raster calculator problem

Question asked by Dzibril1977 on Mar 26, 2015
Latest reply on Mar 27, 2015 by Dzibril1977

Hello all,

I have a problem with map algebra in raster calculator. I need to create a raster by employing this formula

1/(1+Exp^(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN"))

It is a logistic regression prediction probability formula. The rasters involved are:

Z BIN - a grid raster with binary values (pix type integer)

SALINITET BIN - a grid raster with binary values

Vs_aspect BIN -  a grid raster with binary values

Distance to Water - a grid raster with numeric values 0-1000 (distance to water from 0 to 1000 meters) (pix type floating point)

DRENAZA BIN - a grid raster with binary values

Poljski_Vodni_Kapacitet BIN - a grid raster with binary values

When I input the formula in raster calculator as listed above, I get the following error message:

Executing: RasterCalculator 1/(1+Exp^(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN")) "C:\Users\***\Documents\Vrsac\PREDIKCIJA\VPred"

Start Time: Thu Mar 26 19:55:44 2015

1/(1+Exp^(3.642-1.502*Raster(r"Z BIN")-0.784*Raster(r"SALINITET BIN")-0.619*Raster(r"Vs_aspect BIN")-0.004*Raster(r"Distance to Water")-0.738*Raster(r"DRENAZA BIN")-1.029*Raster(r"Poljski_Vodni_Kapacitet BIN")))

ERROR 000539: Error running expression: rcexec()

Traceback (most recent call last):

File "<expression>", line 1, in <module>

File "<string>", line 5, in rcexec

TypeError: unsupported operand type(s) for +: 'int' and 'function'

Failed to execute (RasterCalculator).

Failed at Thu Mar 26 19:55:44 2015 (Elapsed Time: 0.01 seconds)4

I have no idea what does the error line tell me.