Raste Calculator Error PLEASE HELP!!

3412
4
Jump to solution
06-05-2012 06:10 AM
ElenaSava
New Contributor
Hello,

I'm trying to calculate the following expression

             Con(IsNull(("%roadpct%")), 0,("%roadpct%" / 100))  / Float(Lookup("%roadpct%", "Count"))

but for some reason I get the error below. I have tried everything I just cannot seem to figure it out. PLEASE SOMEONE HELP!!! I'm sure its simple but I can't seem to find it.

ERROR 000539: Error running expression: rcexec() <class 'arcgisscripting.ExecuteError'>: ERROR 010414: Error in creating a Raster from a geodataset.
Failed to execute (Lookup).

Failed to execute (Raster Calculator (14)).

Thank you very much!!
0 Kudos
1 Solution

Accepted Solutions
MarkBoucher
Occasional Contributor III

Do you think the error could be due to the Lookup("roadpct","Count") trying to work on a raster that has Null values in it?

What if you
first cleared out the nulls using Con(IsNull(("roadpct")), 0,("roadpct")) and then performed ("roadpct" / 100) / Float(Lookup("roadpct", "Count")).

View solution in original post

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus
0 Kudos
ElenaSava
New Contributor
I have checked the input dataset and changed the output workspace. The error still appears =/
0 Kudos
MarkBoucher
Occasional Contributor III

Do you think the error could be due to the Lookup("roadpct","Count") trying to work on a raster that has Null values in it?

What if you
first cleared out the nulls using Con(IsNull(("roadpct")), 0,("roadpct")) and then performed ("roadpct" / 100) / Float(Lookup("roadpct", "Count")).

0 Kudos
ElenaSava
New Contributor
Hello,

Thank you very much for your help!!! I was able to figure it out. For some reason the model was not reading one of my shapefiles although I don't know why. Thanks again
0 Kudos