Available with Spatial Analyst license.
This workflow will describe how the Local Function can be used to perform complex algebra with one or more images to produce a visual result. This example will perform a calculation of the avalanche susceptibility of an area. The inputs for this analysis will be a digital elevation model (DEM) of the area, and derived layers from this elevation. Once all those layers are in place, the avalanche susceptibility index can be calculated by summing up the following factors:
- The elevation is above 4,000 feet.
- The slope is between 25 degrees and 45 degrees.
- The aspect is between 135 degrees and 225 degrees.
- The plan curvature is less than zero.
- The profile curvature is greater than zero.
The following workflow takes you through the steps to create a raster that represents avalanche susceptibility through its pixel values. A higher pixel value represents a higher susceptibility to avalanches. The requirements for this workflow are three rasters: a DEM with pixel values in feet, a plan curvature calculation from the pixel values of the DEM, and a profile curvature calculation. We will also be calculating the slope and aspect of the DEM values, which will be performed on the fly.
Set up the DEM
First, you need to set up the DEM so that you can insert the Local Function.
- Add the DEM into ArcMap.
- In the Image Analysis window, select the DEM.
- Click the Add Function button .
This brings up the Raster Function Editor window.
Set up summation of the five factors
When using a Local Function, sometimes you need to set up the result before you actually perform each algebraic operation. The section is setting up the architecture of the susceptibility index.
- Right-click Dem_ft.tif, point to Insert, and choose Local Function.
The Spatial Analyst license needs to be enabled in order to use the Local Function.
- Set the operation to Sum, which is under the Cell Statistics section.
- Select the input raster in the list of Input Rasters.
- Click the Add Item button and select Add reference to selected input.
- Repeat step 4 one more time so that there are two Dem_ft.tif entries.
- Click the Add Item button again and click Add raster from disk.
- Browse to your plan curvature raster dataset and add it.
- Repeat steps 6 and 7 for your profile curvature raster dataset.
- Rename the Local Function on the top of the chain to Sum.
Finding pixels above 4,000 feet
On the first branch within the Local Function, select pixels greater than 4,000 feet.
- Insert a Local Function on the first branch.
- Set the operator to Greater Than, which is under the Logical section.
- Click the Add Item button and click Add scalar.
- Enter a value of 4000 and click OK.
- On the General tab, set the function name to Greater Than 4000 and click OK.
Finding pixels within our slope tolerance
On the second branch within the Local Function, select pixels that have a slope range between 25 degrees and 45 degrees.
- Add a slope function on top of the second branch.
- Add a local function on top of the Slope Function.
- Select the first input raster in the Input Rasters section.
- Click the Add Item button and select Add copy of selected input. Click OK.
- Select the operator Boolean And and name the function Boolean Andon the general tab. Click OK.
- Add a local function on top of the first slope branch. Select operator greater than and add a scalar of 25.
- Add a local function on top of the second slope branch. Select operator less than and add a scalar of 45.
- Minimize the chains on the first two branches to make it easier to see.
Finding pixels within our aspect tolerance
On the third branch, select pixels that have an aspect between 135 degrees and 225 degrees.
- Add an Aspect Function on top of the second branch.
- Add a local function on top of the Aspect Function.
- Select the first input raster in the Input Rasters section.
- Click the Add Item button , select Add copy of selected input, and click OK.
- Select the operator Boolean And and name the function Boolean And on the general tab. Click OK.
- Add a local function on top of the first aspect branch. Select operator Greater Than and add a scalar of 135.
- Add a local function on top of the second aspect branch. Select operator Less Than and add a scalar of 225.
Setting the plan curvature and profile curvature tolerance
On the fourth and fifth branches of the Local Function, set the plan curvature and profile curvature thresholds. On the plan curvature branch select pixels that are greater than 0. On the profile curvature branch, select pixels less than 0.
- On the plan curvature branch, add a Local Function, select operator Greater Than, and add a scalar of 0.
- On the profile curvature branch, add a local function, select operator Less Than, and add a scalar
of 0.
The final Local Function chain should look like the following.
The result of this Local Function will be a raster dataset with values ranging from zero to five. A value of zero and one (green) will have a low susceptibility for an avalanche and a value of four and five (orange and red) will have a high susceptibility.