[GIS] Assigning new values to raster attribute table by comparing two fields

arcgis-10.0arcgis-desktopattribute-tableraster

I have created a new raster from two raster datasets using combine operation in ArcGIS. The new attribute table has two fields from the input rasters. What I need is, to compare these two fields and assign meaningful values to a new field.

For example:

see the attached image (I don't know how to past a table in here)
enter image description here

… this list goes to few hundred.

“New Class” is the field that I need to assign the new values.

I have been using “code block” in field calculator using python. But it is too long that I have to write individual statements for each unique combination. I am looking for an efficient way other than my method.

Something like reading from a reclassification table?

Best Answer

It appears from your graphic that you have this calculated in Excel, so you can import as a standalone table in to ArcMap (gdb or dbf) with the unique combination of calculated values. Then use the Join Field tool to copy over those 'NewValue' values to the raster table (If you don't have an ArcInfo license you will have to use the Add Join tool followed by Calculate Field). I typically concatenate fields to help with multi-field joining; therefore !Raster1! + "_" + !Raster2! (Python parser) has its values copied to a new field named JoinField, and this same field is used in the 'reclassification' table to identify the unique combination of calculated values.

Related Question