Skip To Content

Get started with raster functions in ArcGIS Pro

In this tutorial, you'll learn how to build a raster function template (RFT) in ArcGIS Pro to support a processing workflow for assessing vegetation coverage and relative health.

The Sacramento National Wildlife Refuge provides critical refuge and breeding habitat for migratory birds and other wildlife and manages endangered, threatened, and sensitive species. The refuge also serves to alleviate crop damage from wildlife along the Sacramento River valley.

In this tutorial, you'll use raster functions to investigate the coverage and health of natural vegetation and crops around the wildlife refuge, which helps the refuge balance the requirements of natural wildlife and agricultural land use.

Add the tutorial data to your ArcGIS Pro project

The data packaged for this tutorial includes a subsection from a Landsat 8 scene collected on June 8, 2018.

  1. Download the tutorial data, save it to your machine, and unzip the files.
  2. In ArcGIS Pro, create a project using the Map template and sign in to your ArcGIS Online account.
  3. Set up your project:
    1. On the Map tab, click the Basemap drop-down and select Imagery.

      This replaces the default basemap with world imagery.

    2. On the Insert tab, click Add Folder, and browse to the folder where you saved the tutorial data. Select the folder and click OK.
    3. On the View tab, click Catalog pane.
  4. In the Catalog pane, expand Folders to view the tutorial data. Right-click the L8_SactoCA_6_8_18.tif raster dataset and select Add to Current Map.

Visualize the raster

The raster layer in the Contents pane controls how ArcGIS Pro visualizes the source data (accessible in the Catalog pane).

Band combinations (or more complicated chains of functions) are applied to the source data in memory. This means that processing results are quickly rendered on the fly as you pan and zoom. It also means that there is no need to store or manage intermediate processing results.

Explore the raster layer and change the band combination used to render the image.

  1. In the Contents pane, right-click the L8_SactoCA_6_8_18.tif layer and select Properties.
  2. In the Layer Properties dialog box, select Source and view the detailed raster information, raster metadata, band metadata, image statistics, extent, and spatial reference information. All of these image file properties are derived from the source Landsat 8 metadata.
    Layer Properties dialog box for example raster
  3. Close the Layer Properties dialog box when you’re finished.
  4. Change the band combination used to display the image from natural color to color infrared:
    1. Select the L8_SactoCA_6_8_18.tif  layer in the Contents pane.
    2. On the Appearance tab in the Raster Layer group, click the Band Combination drop-down arrow and select Color Infrared to change the band combination.

      Your raster looks similar to the following:

      The Landsat 8 image is displayed as color infrared. Healthy vegetation is bright red.

Use a raster function to compute the vegetation index

Next, you will apply a raster function to the image to calculate a vegetation index to delineate areas of dense, healthy vegetation.

  1. Click the raster layer in the Contents pane to activate it. On the Imagery tab, click Raster Functions.
  2. In the search box, type band, and click the Band Arithmetic raster function in the results.
    The Band Arithmetic dialog box appears.
    Note:

    You can click the information button on the Band Arithmetic dialog box to display the function help. Many types of out-of-the-box vegetation indexes are described, or you can create a custom index using this function.

  3. Set the parameters for the Band Arithmetic function:
    1. Raster-Click the drop-down arrow and select L8_SactoCA_6_8_18.tif.
    2. Method-Click the drop-down arrow and select SAVI.
    3. Band Indexes-Type 5 4 0.33, which are the band numbers for the Landsat 8 near infrared and red bands and an estimate of the SAVI value for green vegetation cover.
  4. Click Create new layer.

    The resulting single-band SAVI layer is loaded into the Contents pane and displayed in the map viewer. The name of the applied raster function is a prefix to the source data file name; in this case, it is Band Arithmetic_L8_SactoCA_6_8_18.tif.

    The source data is 32-bit floating point format, but it is scaled to 8-bit for display.

    Bright areas exhibit full vegetation coverage and high relative vigor. Dull or dark areas exhibit nonvegetated areas such as bare soil or water bodies.

    Note:

    If the result is a solid gray block, select the layer in the Contents pane, open the Appearance tab on the main ribbon, and select DRA from the Rendering group.

  5. Pan and zoom to explore the SAVI results layer. You can visually identify the areas that show up as healthy, dense vegetation. Notice that the raster layer is rendered on the fly, and the original source data has not been copied or altered.

Chain together functions to classify vegetation

Now, you’ll chain together multiple functions to group your results into four categories for interpretation.

  1. In the Raster Function pane, in the search box, type remap, and click the Remap raster function in the results.
  2. Set the parameters to remap the values of the layer:
    1. Raster—Click the drop-down arrow and select Band Arithmetic_L8_SactoCA_6_8_18.tif.
    2. Remap Definition Type—Choose List to manually list the categories.
    3. Fill in the list using the following values:
      Remap the SAVI data into four vegetation density and health categories.
    4. Check the  Change Missing Values to NoData check box.
    5. Click Create New Layer.

      The resulting single-band raster shows categorical data on a scale from 1 through 4, where 1 represents areas with very low SAVI values, indicating little to no vegetation, and 4 represents high SAVI values or dense, healthy vegetation.

  3. Click the name of the layer in the Contents pane and rename it SAVI_Classified.
  4. Select the layer in the Contents pane. On the Appearance tab, click the Symbology button to open the Symbology pane.
  5. Set the parameters to symbolize the classified SAVI layer:
    1. Click the Primary symbology drop-down arrow and select Classify as the symbology type. Choose Yes to compute the histogram.
    2. Method—Select Equal Interval.
    3. Classes—Select 4.
    4. Edit the symbology table to match the image below. Click each color chip to change the colors to a more appropriate color scheme. You can also change the label to be easier to interpret.

      SAVI color map

      Your map looks similar to the following:

      SAVI data with an assigned color map

Review and export the raster function chain

You can view the chain of functions applied to a layer, modify their parameters, and add functions using the Raster Function Editor.

  1. To review the chain of functions used to accomplish this result, right-click the SAVI_Categorized layer in the Contents pane and select Edit Function Chain.
    SAVI_Categorized function chain
  2. Double-click the Remap function to see the parameters you set earlier. Click Cancel to close.
  3. Save the raster function template by selecting the functions you want in your processing chain (press Ctrl and click each function or select by rectangle in rubber band mode). Right-click one of the selected functions and choose Export as Template.

    A new raster function editor window appears and the raster function chain is loaded.

  4. Delete the raster variable at the beginning of the function chain.
  5. Double-click the Band Arithmetic function. Click the Variables tab and check the IsPublic check box next to Raster, and click OK.
    Band Arithmetic Properties window
  6. Click Save As to save the raster function processing chain as an .rft file. Name it SAVI_Classified and click OK.
  7. In the Raster Functions pane, select Custom. Click your new RFT. The tool now prompts you to select a raster so you can apply your processing workflow to another Landsat 8 scene.
Note:

Up to this point in your image processing workflow, all the processing has been done in-memory. You can optionally persist the results to disk. To do this, right-click the layer in the Contents pane, select Data > Export Raster, and configure as desired.

In this tutorial, you learned how ArcGIS Pro uses dynamic in-memory processing to quickly render rasters as you pan and zoom. You also learned how to apply raster functions to your image, chain them together to create more complex processing workflows, and save the function chain as a raster function template that you can apply to other rasters in the future.

Related topics