Select to view content in your preferred language

Lookup function in v10.0 Map Algebra: implementing dot notation in v10.0?

6306
10
Jump to solution
01-11-2012 12:10 PM
ChrisSnyder
Honored Contributor
I have a need to do analysis on a multi-field raster dataset in ArcMap v10.0. I am accustomed to using "dot notation" that was natively supported in ESRi products for the last 20+ years...

In this thread (http://forums.arcgis.com/threads/16689-Using-raster-attribute-other-than-value-in-map-algebra), it seems that there is now a function called Lookup(), which you can now use to emulate the old fashioned .notation functionality. Great.

However, what I seem to be unable to do is to use the Lookup() function in Map Algebra... It works fine via the toolbox, but not if building complex Map Algebra expresions.

So, basically this is an example of a v9.3 SOMA expression I want to use in v10:

con([gnn].CANOV >= 70 & [gnn].STNDHGT >= 23, 1, 0)

According to the help, this should be the analogous statement in the new Map Algebra

con(((Lookup("gnn", "CANCOV")) >= 70) & (Lookup("gnn", "STNDHGHT")) >= 23), 1, 0)

But it errors out on the Lookup() command...

In fact I can't even run this through the raster calculator:

Lookup("gnn", "CANCOV")

The error message for both these v10.0 examples is:

ERROR 000539: Error running expression: rcexec() <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid.
ERROR 001000: Lookup field: Field C:\Users\csny490\Documents\ArcGIS\Default.gdb\CANCOV does not exist
Failed to execute (Lookup).
Failed to execute (RasterCalculator).

...which is pretty interesting because my raster "gnn" is not stored in the Default.gdb, and, why would it be concatenating the field I want to lookup with the stupid path to Default.gdb anyway!


This leads me to belive that either:
1. I am doing something wrong
or
2. The Lookup() spatial analyst functiona can't be accessed via the "new and improved" map algebra, even though the Help topic indicates it can.

How can I implement this traditional "dot notation" functionality in the new v10.0 Map Algebra?
0 Kudos
10 Replies
ChrisSnyder
Honored Contributor
Another option: Use this tool (http://arcscripts.esri.com/details.asp?dbid=16700) or a similar methodology to "flatten" the overlapping polygons and use the optional lookup table in a cursor to traverse/analyze the overlapping regions. After flatteneing, you could rasterize the flattened output and use the lookup table with the raster (or the original polygons). I've been contacted by a few people over the years that use this tool for fire stuff - for example: http://www.google.com/url?sa=t&rct=j&q=superregionpoly&source=web&cd=6&ved=0CFgQFjAF&url=http%3A%2F%...
0 Kudos