Error while using raster calculator in model builder

2090
2
05-05-2013 03:28 PM
by Anonymous User
Not applicable
Original User: sxt128130

I am trying to use the model builder for the RUSLE Model. Well this is how the model looks like:
[ATTACH=CONFIG]24064[/ATTACH]

So in the raster calculator I have a formula which also involves the rasters generated in the model. This is error which I get .Could anyone tell me what could be going wrong.
[ATTACH=CONFIG]24065[/ATTACH]

Below is the forumla which I am using in the first raster calculator block:

Power( [ "%FlowAcc_Flow%" ] * 10 / 21 , 0.4 ) * Power( Sin( "%Slope_Fill%" ) / 0.09 , 1.4 ) * 1.4

I am just trying to use it in the model and not as a python script.

Regards,
Senthil
0 Kudos
2 Replies
SamCoggins1
New Contributor III
Try adding in a (Float ...) like this:

(Float(Power( [ "%FlowAcc_Flow%" ] * 10 / 21 , 0.4 )) * (Float(Power( Sin( "%Slope_Fill%" ) / 0.09 , 1.4 ) * 1.4)

There is a Float tool in Model Builder you can add to the variables as well if needed.


I am trying to use the model builder for the RUSLE Model. Well this is how the model looks like:
[ATTACH=CONFIG]24064[/ATTACH]

So in the raster calculator I have a formula which also involves the rasters generated in the model. This is error which I get .Could anyone tell me what could be going wrong.
[ATTACH=CONFIG]24065[/ATTACH]

Below is the forumla which I am using in the first raster calculator block:

Power( [ "%FlowAcc_Flow%" ] * 10 / 21 , 0.4 ) * Power( Sin( "%Slope_Fill%" ) / 0.09 , 1.4 ) * 1.4

I am just trying to use it in the model and not as a python script.

Regards,
Senthil
0 Kudos
by Anonymous User
Not applicable
Original User: sxt128130

I just changed the square brackets to  round brackets and it worked.Thank You.


Try adding in a (Float ...) like this:

(Float(Power( [ "%FlowAcc_Flow%" ] * 10 / 21 , 0.4 )) * (Float(Power( Sin( "%Slope_Fill%" ) / 0.09 , 1.4 ) * 1.4)

There is a Float tool in Model Builder you can add to the variables as well if needed.
0 Kudos