Ok, I am trying to use the con function in ArcGIS 10 raster calculator on a grid called "slopeperc" which is a floating point grid.
I want to change all values in "slopeperc" that are < 20 to 0 and if > 60 I want them to be 1. All other values should be subject to the equation ("slopeperc" -20) / 40. My resulting grid should be something that ranges from 0 to 1.
Thanks for your help!
Oh, this is what I have tried but can't figure out why I get an ERROR 000539 message and an output raster with nothing added to my table of contents.
well we both missed the glitch...Con != con as an example Con("grid1" < 2, 0, Con("grid1" < 3, 1, ("grid1" - 1) / 4.0)) worked for me with my sample expression Con("grid1" < 2, 0, con("grid1" < 3, 1, ("grid1" - 1) / 4.0)) failed
In 10, one needs to be aware that expressions are case sensitive as well as space sensitive
Sorry, that still didn't work. I guess any insight on how to do a con inside another con would be helpful. I see the examples in Help but still can't get it right. Argh!
well we both missed the glitch...Con != con as an example Con("grid1" < 2, 0, Con("grid1" < 3, 1, ("grid1" - 1) / 4.0)) worked for me with my sample expression Con("grid1" < 2, 0, con("grid1" < 3, 1, ("grid1" - 1) / 4.0)) failed
In 10, one needs to be aware that expressions are case sensitive as well as space sensitive
Also having problems with CON in raster calculator. The quotes and percent signs seem to get added when I drag a lyer listed above the expression. Could it be the "dot" syntax CON("%hor_vis_rg%".count >= 23, 1)
So then I tried the CON function instead of Raster Calculator, with the SQL expression "Count" >= 310, and got the same Error.
I believe "%" is model element notation -- like Diane is using the Map Algebra tool inside ModelBuilder, and "hor_vis_rg" is a data element inside the model.