Skip To Content

Raster Function Editor

The Raster Function Editor is a visual programming interface for building imagery and raster analysis processing chains. Function chains are represented as diagrams in which functions are chained together, using the output of one or more functions as the input to another function. Raster function chains can be saved as raster function templates, which you can reuse to automate your 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 function chain by adding raster functions, raster variables, scalars, and required data types to the diagram, and connecting them to perform analysis. This analysis can be performed on the current display extent or in a distributed manner using raster analysis.
  • Save a function chain 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 chained 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, where 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 gets 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.

You can use a saved raster function template as a custom renderer for dynamic imagery layers in your web map. This on-the-fly processing uses the raster function chain in the template to display a dynamic image service as a processed result, without requiring you to generate a new dataset.

Create a raster function template

There are over 150 built-in raster functions available for your imagery and raster-related tasks. Once you know the functions needed for your 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 Classic.
  3. Click the Analysis tab to open the Perform Analysis pane, then select Raster Analysis.
  4. Click the Raster Function Editor button Raster Function Editor.

    An empty function editor window appears.

    The function editor window is divided into two parts, with the available functions listed on the left and the raster function chain editing workspace next to it. The default view shows the built-in raster functions in the System category.

    The tools at the top of the workspace allow you to add variables to the chain and manage the raster function template. You can use the tools to move and align layout, add a raster variable input, add a scalar input, and delete the function nodes.

  5. In the list of raster functions, with the System filter, type to search for a specific raster function. To browse to existing raster function templates, click System and select from one of the other options for filtering the contents. For example, select My Organization to find raster function templates that were created and shared by members of your organization.
  6. When you have found 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.
  7. Once it has been added, double-click the raster function in the editor window to view or modify the properties.

    The property 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 any member of your organization that uses 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 box for IsPublic. 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.

    Click OK to close the properties window.

  8. Optionally, do one or more of the following things:
    • 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 your raster function template includes multidimensional analysis, be sure to specify the multidimensional rules settings.
    • Click the Switch to pan mode button Switch to pan mode to use your 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.

  9. When you are finished building your raster function chain, click Save or Save As to save it as a raster function template.

    The Save window appears. You can provide a title, type, tags, specify the folder in which to store it, and sharing options.

    When you are finished, click Save.

  10. Click OK at the bottom of the function editor window.

    If you did not save the raster function template, you will be asked if you want to save it now. 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 set to IsPublic in the function properties, will appear in the pane.

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

  11. Optionally, click 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 your analysis. To speed up the preview processing, zoom in to a small region of analysis.

  12. Click Run Analysis to run the raster function template.

    The results of your 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. In the Raster Analysis pane, click the Browse Raster Function Templates button Browse Raster Function Templates.

    The Custom Analysis Tools content window appears.

  3. In the Filter panel, click Item Type > Raster Function Templates to display a list of saved raster function templates.
  4. Find your raster function template in the list, click the drop-down arrow on the Select button, and click Edit.

    The raster function template is available for editing in the raster function editor.

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