ArcGIS Blog

Imagery & Remote Sensing

ArcGIS Online

Change detection in Map Viewer Part 2: Measuring change with raster functions

By Jeff Swain and Ling Tang

Measuring change over time with satellite data is one way to study the growth of an area and consider its future. For instance, if you were studying drought conditions at Shasta Lake, California over the last twenty years to measure how much has changed. What data might you use? Are there available data and tools in ArcGIS Online to assist the analysis? How would you start?

In this blog series, there will be two parts that will show you the steps to explore the imagery layer from ArcGIS Living Atlas of the World, locate the specific imagery layers at the time periods desired, and then use raster analysis to measure how the area has changed over the last twenty years. This process will be divided between two blogs and feature the Image collection explorer and Raster function editor to complete the analysis.

This blog will cover the analysis with raster functions in the Raster function editor. The other blog is available through this link (Image collection explorer).

Background

In the previous blog, you were able to locate both of the input imagery layers that you will need for your change detection within the USA NLCD Land cover imagery layer.  Now you are ready to use raster functions to measure the change between the two input imagery layers. For this analysis, there are two raster functions (Compute Change and Attribute table) that will be combined to create a new raster function template for future analysis.

Requirements

To complete this tutorial, you will need to have an ArcGIS Online account to add the USA NLCD Landcover imagery layer to a web map and you will need to have a Professional, or Professional Plus user type, which you will need to perform raster analysis.

The Raster function editor in Map Viewer is used to combine raster functions together to create new imagery layers in ArcGIS Online. Imagery layers can be visualized or analyzed to change characteristics of the imagery layers and create new imagery layers. You can edit an existing raster function template that has been shared or create a new one in the editor. The change you are interested in this scenario is to measure how many areas changed to wetlands or barren lands.

Steps

  1. Sign into ArcGIS Online and open a new web map.
  2. In the search bar, type in Shasta lake, California and click Enter.
    The web map will zoom to the area around Shasta Lake in preparation to review the input imagery.
  3. Pan the web map until you see all of Shasta Lake.
Shasta Lake, California

Now that you have located the map in the study area, you are ready to add the input layers.

    1. If you completed the previous blog, then you can add your imagery layers.
      However, if you have not, then you can add these two layers to the web map. To locate the imagery layers, type owner:imagery_development_team shasta and add both the Shasta NLCD 2001 and Shasta NLCD 2022 imagery layers.
    2. In the Settings toolbar, click the Time slider to turn off time.
      This will allow all of the input imagery layers to be visible, when the Time slider is enabled by default the Shasta NLCD 2022 imagery layer will not be visible.
    3. Click Analysis to open the Analysis pane.
    4. In the Analysis pane from the Home tab, select Raster Functions.
    5. At the bottom of the Raster Functions pane, click New Raster Function Template to open the Raster Function Editor.
New raster function template button
    1. In the Raster Function Editor, click Expand to view the names of each button.
    2. Click Add raster functions to view a list of available raster functions.
Expanded raster function editor
      1. From the Add raster functions list, locate Compute Change and click the Add button to add it to the editor.
        The raster functions in the list are arranged in groups according to their usage. The Compute Change raster function was listed in the Analysis group.
      2. Scroll down in the list of raster functions, locate the Attribute table function, which is located in the Data Management group, and click Add button.
        Both raster functions will be added to the editor.
Raster function template editor with raster functions added
    1. In the editor, reposition the raster functions so they line up with each other.
      To reposition the raster functions, hover the cursor over the middle of the raster function until the move icon appears, click the button, and drag the raster function into position.
Raster functions can be repositioned in the editor by click and drag
    1. Once you have repositioned the raster functions, hover the cursor over the edge of the Compute Change raster function to see the connector, click the Out connection and drag the connecting line to the Attribute table function.
      You can also use the search bar within the Raster Functions tool to locate raster functions.
Hover over the edge to see the connector
The connector will appear when you hover over the edge. Click and drag to the next raster function.
Raster functions connected in Raster function editor
Once connected, the raster functions will have a line between them.

Now that you have connected the two raster functions together, you are ready to add the input imagery layers to the Compute Change function. To see how drought has affected the water, you will concentrate your change detection between the Open Water class (11) and when it changes to Barren lands class (31) or Wetlands class (95).

    1. Double-click the Compute Change raster function to expand the parameters.
    2. Enter the following parameters:
      • From Raster : Shasta NLCD 2001
      • To Raster : Shasta NLCD 2022
      • Compute Change Method : Categorical Difference
      • From Class Values : 11
      • To Class Values : 31 95
    1. Click OK.
    2. Click the Auto Layout button to organize the raster functions.
Raster function template for compute change

Now that you have entered the parameters for the Compute Change raster function, you will also enter parameters for the Attribute Table function.

    1. Double-click the Attribute Table function to expand the parameters.
    1. Enter the following parameters:
      • Value : 0 ; ClassName : To Barren lands ; Color : Red
      • Value : 1 ; ClassName : To Wetlands ; Color : Red
Attribute Table function parameters
    1. Click OK.
      Now that you have entered all the parameters in the raster functions, you are ready to save and run the raster function template.
    2. Click Open to run to open the raster function template.
Open to run button
  1. You will be prompted to save the raster function template.
  2. Click Don’t Save when prompted to save the raster function template. The raster function template will be opened in the Analysis pane with the parameters set in the editor.
  3. Review the parameters in the raster function template to confirm that you have entered them correctly, scroll down the raster function template until the Preview button is visible, and enable it. A preview of the output will appear in the map.
Preview of results from raster function template
The Preview button is available to test your raster function template before running the process.

If the preview matches the graphic, then you are ready to create the output imagery layer. Each raster function template run creates a new layer in your ArcGIS Online organization. The preview will allow you to review the output before running your raster function template.

    1. In the Result layer section, type a name for your output like ShastaLC_ change2001_2022.
    2. Expand the Environment settings and for Processing Extent select Display Extent. By default, raster analysis tools will choose the full extent of the input layers. Processing the full extent of some input layers may be more costly in credits and processing time, so carefully consider this setting when using raster function templates.
    3. Click Estimate credits to see the number of credits estimated for this analysis. For this analysis you can see that it will cost only one credit.
    4. Click Run to start the analysis.
Results of drought change detection

Once the process completes, click the History tab in the Raster Analysis pane. You can review the messages about all the processing you have completed in this web map.

    1. Click the three dots to the right of the processing entry and select View details to see any messages and result remarks about the process. You will immediately be prompted that you have unsaved changes in your raster function editor.
    2. Click Save and enter a name for your raster function template like RFT_DroughtLC.
    3. Click Save.

 

Item details page example
The Item details page will give you a recap of the processing, parameters, and any messages generated during processing.
    1. In the Details dialogue, select Messages and review the details about the processing and then close the Details dialogue.
    2. In the Layers pane, turn off the visibility of the input imagery layers to review the output.

In this blog, you have learned how to create a raster function template with the Raster function editor. There are many more raster function templates already shared in ArcGIS Online for you to try and I hope that you are able to create your own for your analysis based on this process.

Share this article

Subscribe
Notify of
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments