craignt

Map Algebra Formula created in 9.3.1 Malfunctions in 10.0

Discussion created by craignt on Jun 2, 2011
Latest reply on Jun 7, 2011 by Dan_Patterson
I have a Map Algebra formula that works perfectly in the old Spatial Analyst Raster Calculator in 9.3.1 that has a Python error (Python syntax error: Parsing error : invalid syntax) in 10.0 
Not sure if the syntax needs revision or what. I also have multiple rasters being created by the script and wasn't sure how the changes in the new Raster Calculator would handle them.  Here is a sample of the formula:

[nbgrs] = CON(( [caca2fm40] < 100 ) AND ( [caca2fmc] > 100 AND [caca2fmc] < 120 ), ABS( [caca2fm40] - [caca2fmc] ), 0 )
[nbgsh] = CON(( [caca2fm40] < 100 ) AND ( [caca2fmc] > 120 AND [caca2fmc] < 140 ), ABS( [caca2fm40] - [caca2fmc] ), 0 )
[nbshb] = CON(( [caca2fm40] < 100 ) AND ( [caca2fmc] > 140 AND [caca2fmc] < 160 ), ABS( [caca2fm40] - [caca2fmc] ), 0 )
[nbtbu] = CON(( [caca2fm40] < 100 ) AND ( [caca2fmc] > 160 AND [caca2fmc] < 180 ), ABS( [caca2fm40] - [caca2fmc] ), 0 )
[nbtbl] = CON(( [caca2fm40] < 100 ) AND ( [caca2fmc] > 180 AND [caca2fmc] < 200 ), ABS( [caca2fm40] - [caca2fmc] ), 0 )
[nbslb] = CON(( [caca2fm40] < 100 ) AND ( [caca2fmc] > 200 ), ABS( [caca2fm40] - [caca2fmc] ), 0 )
outnonbrn = ( [nbgrs] + [nbgsh] + [nbshb] + [nbtbu] + [nbtbl] + [nbslb] )

Any help would be definitely appreciated!  :D


:( I've read about why the changes to Raster Calculator were applied to 10.0 which I found troubling (especially when it was stated that most of the user community has accepted and has adapted to the new Raster Calculator).  I work in a multi-agency federal government environment with several hundred users and we definitely have not adapted!!  This leads me to the fact that this decision was not thought out well and did not have a majority of users in support! :confused:

Outcomes