Raster Function Editor

The Raster Function Editor is a visual programming interface for building imagery and raster analysis function templates. In the editor, raster functions are represented as diagrams that can be joined together using the output of one or more functions as the input to another function. These joined raster functions can be saved as raster function templates, which you can reuse to automate image analyses and processes. You can create new raster function templates or modify existing raster function templates in the Raster Function Editor.

The Raster Function Editor allows you to perform many tasks, including the following:

  • Build a raster function template by adding raster functions, raster variables, scalars, and required data types to the diagram, and connecting them to perform analysis.
  • Save raster functions as a raster function template, providing a title, tags, and sharing options for the template.
  • Browse built-in raster functions or previously saved raster function templates to include in a new raster function template.

Raster function template

A raster function template is similar to a model because it contains processing steps that are joined together to perform a more complex workflow. A raster function template can contain one or more raster functions, and inputs to the raster functions can be set as variables, allowing users to plug in different values when they run the raster function template.

The raster function template below illustrates a methodology for describing burn severity and the health of vegetation recovery, using prefire and postfire imagery. The appropriate functions are placed in the editor and are interactively connected in which the output from one function is the input to the next function in the processing chain.

Raster function template in the editor

When you save a raster function template, it is stored as an item in your My Contents page. You can open the item details for a raster function template, download it as a JSON file to use in ArcGIS Pro, or share it with members of your organization or publicly.

Note:

Click the Open in Raster Function Editor button on the item details page to open and display the raster function template in the editor. You can make additional edits there or edit them in the web map.

Create a raster function template

There are more than 170 built-in raster functions available for imagery and raster-related tasks. Once you know the functions needed for a task, you can add those functions to a raster function template.

To create a raster function template, complete the following steps:

  1. Verify that you are signed in and have the privileges to create content and perform imagery analysis.
  2. Open a new or existing map in Map Viewer.
  3. Click the Analysis tab to open the Analysis pane, and choose Raster functions.
  4. Click the New Raster Function Template button.

    An empty function editor window appears.

    The tools at the upper left of the workspace allow you to open existing raster function templates, add raster functions, and add variables to the chain. You can use the tools to move and align the layout, add a raster variable input, add a scalar input, and delete the function nodes.

    The tools at the upper right of the workspace allow you to run the template, save the template, edit template properties, or share the raster function template.

  5. You can start with an existing raster function template that has been shared with you or available through ArcGIS Online.
  6. Click the Add raster function button to see a list of available raster functions. In the list of raster functions, type a keyword to search for a specific raster function or browse the dialog box to manually select a raster function.
  7. When you find the raster function or function template you want to use, click the Add Function button Add function to add the raster function to the editing window.
  8. Once it has been added, double-click the raster function in the editor window to view or modify the properties.

    The properties window contains the following tabs:

    • General—Provide a name and description for the function. This is useful when you create a raster function chain with multiple functions. The name of the function can describe what the function does, so other members of your organization who use the function chain can understand how the function is used. Set the Output Pixel Type option if required. If it's not set, the output type will match the input pixel type.
    • Parameters—Edit the parameter values of the function. If not set as public variables, these values will be the values that are used when running the template.
    • Variables—Set certain parameters as variables to expose them in the Analysis pane when running the function template by checking the IsPublic check box. Rename parameters in the Name column to provide additional context. Renaming the input raster parameter can be important when there are multiple raster inputs required for a chain of processes.
      Note:

      If none of the parameters in the raster function template are set to IsPublic, all parameters will be exposed as variables.

  9. Click OK to close the properties window.
  10. Optionally, do any of the following:
    • Add additional functions to the editor window and chain the processes together.
    • Click the Edit Properties button Edit Properties at the top of the editor window to edit the raster function template properties. If the raster function template includes multidimensional analysis, specify the multidimensional rules settings.
    • Click the Switch to pan mode button Switch to pan mode to use the pointer in pan mode in the window. Click the button again to switch back to selection mode.
    • Click the Auto Layout button Auto Layout to apply an automatic layout for the raster function chain.
    • Click the Add Raster Variable button Add raster variable to add a data source input to the raster function chain.
    • Click the Add Constant button Add Constant to add a scalar constant value input to the raster function chain.
    • Click the Delete Selected Items button Deleted Selected Items to delete the item or items selected in the function editor window.

    You can link two nodes by clicking and dragging an edge of the raster function source node toward the target raster function node, creating a link between the two.

  11. When you finish building the raster function chain, click Save or Save As to save it as a raster function template.

    The Save window appears.

  12. Optionally, provide a title, type, tags, specify the folder in which to store it, as well as sharing options, and click Save.
  13. Click OK at the bottom of the function editor window.

    If you did not save the raster function template, a prompt appears. If you still don't want to save it, click Don't Save to proceed to the next step.

    The raster function template opens in the Analysis pane. The required input parameters, or all the parameters that are set to IsPublic in the function properties, appear in the pane.

    The Analysis pane contains a panel summarizing each raster function in the processing chain. You can verify the parameter settings for each function and use the Show Preview option for the processing chain result. If the results are unsatisfactory, you can change the parameter settings and display the preview results again.

  14. Optionally, turn on the Show Preview toggle button to generate a preview layer of the output.

    The preview layer can be used to help you determine the parameter settings for the analysis. To speed up the preview processing, zoom in to a small region of the analysis.

  15. Click the Open to run button to run the raster function template.

    Note:
    You are prompted to save the template. If you click Yes, the template properties dialog box appears to allow you to save the template. If you click No, the raster function template opens in the Analysis pane.

  16. Complete the remaining parameters of the raster function template and click Run.

    The results of the raster function template appear in Map Viewer Classic.

If you saved the raster function template, it is saved as an item in Contents. You can share the item publicly or with members of your organization, and you can reuse the template from the Raster Analysis pane by clicking the Browse Raster Function Templates button Browse Raster Function Templates.

Edit an existing raster function template

To edit and apply an existing raster function template, complete the following steps:

  1. Follow steps 1 through 3 above.
  2. Click the Open template button.

    The Browse Raster Function Templates dialog box appears where you can select and confirm which existing raster function template you want to use. The default view is My content as the location to begin searching. You can also search your organization, ArcGIS Online, or ArcGIS Living Atlas of the World.

  3. Find the raster function template in the list, click the drop-down arrow on the Select button, and click Confirm.

    The raster function template is available for editing in the Raster Function Editor.

  4. Click Save As to save it as a new raster function template, or click Save to overwrite the existing raster function template.