using RECLASS in Raster calculator

3672
3
05-07-2010 08:03 PM
by Anonymous User
Not applicable
Folks:

I'm trying to do a reclass in raster calculator and having a heck of a time with it.  You guys have been so very helpful and I"m  grateful.  Below are the facts (as I know them).  Thanks to all those who can help.

Best,
Tom Mueller


This is the syntax that raster calculator provides:

Usage:  (out_int_grid) RECLASS (<grid>, <remap_table>, {DATA | NODATA},
                     {in_item}, {out_item})

so I"m trying with the following text:

dork = RECLASS ( [avg_upslope3] , D:\Analysis_D\Dosskey_1\Attempt_4\test_d\remap.txt , NODATA )

The text file is attached and contains the following:

0         3.25  :  7  
3.25    5.75  :  6
5.75    8.25  :  5
8.25  10.75  :  4
10.75   13.25 : 3
12.25    15.75  : 2
15.75    18.25  : 1
18.25     10000000 : 0   

in item and out item are optional.... I don't think I need them here...????

Thanks,
Tom
0 Kudos
3 Replies
by Anonymous User
Not applicable
Bill, you are brilliant.  How the heck did you think of that..... Amazing.  You are the man.
0 Kudos
by Anonymous User
Not applicable
I had to modify the code a bit Bill:

sl_class = Min( 7, Max( 0, Int( (20.75 - [avg_up]) / 2.50 ) ) )

Amazing!
0 Kudos
by Anonymous User
Not applicable
Thanks Dr. Huber. 

I've done similar things in Excel but I had never ever thought of doing this with Map Algebra.  This and some of your other answers have blown me away.  I've ordered Tomlin's book from the library.  Can't wait.

best,
Tom
0 Kudos