Is there a way to do the following in Raster Calculator in ArcGIS?

In GRASS r.mapcalc you can access the cells surrounding the current cell by writing inputRaster[a,b] where a and b represent the number of cells away from the current cell. So you can write complex map algebra expressions using the surrounding and central cell, not just what is directly above or below it in the raster stack.
For example if I wanted to estimate the 3d surface area of a DEM, I could add up the the area of each of the 8 triangles formed between the central cell and each pair of its 8 neighbors (each triangle of course would only go half way out to the surrounding cells).

Is there a way to do this in Raster Calculator in ArcGIS? Or some other tool, or in python maybe?


You'll need the 3D Analyst license to do this.

You can use the ArcToolBox\3D Analyst Tools\Functional Surface\Surface Volume

Or if you prefer python scripting:

SurfaceVolume_3d (in_surface, {out_text_file}, {reference_plane}, {base_z},
                  {z_factor}, {pyramid_level_resolution})

Read more about it here: http://desktop.arcgis.com/en/arcmap/latest/tools/3d-analyst-toolbox/surface-volume.htm

| improve this answer | |
  • This answers the example application question but leaves the general question open. How do I access the surrounding cells is what I am really asking. – thayer Mar 19 '16 at 16:03
  • @thayer Okay, you'll want something like Raster Calculator in combination with something like Focal Statistics. You can define the "shape" very specifically by defining it in a text file. Read this and play around with it. Once you wrap your head around it, you can do some pretty powerful stuff on rasters: desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/… – alexGIS Mar 20 '16 at 4:42
  • I guess I could apply a custom shape using focal statistics to one cell at a time to get what I want. – thayer Mar 20 '16 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.