Create a 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.

Raster function template in the editor

When you save a raster function template, it is stored as an item on 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 create raster function templates through the Add new item interface in ArcGIS Online and save them in your organization. From the New Item interface, you can the raster function using the 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 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 combining raster functions, raster variables, scalars, and required data types to the diagram and connecting them to perform analysis.
  • Save a combination of 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.

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

  1. Verify that you are signed in to your organization and have privileges to create content.
  2. At the top of the site, click Content.
  3. From the My Content tab of the content page, click New item.
  4. In the New item window, click Raster function template.
  5. Type a title.
  6. Choose a folder in My content where you want to save the item.
  7. If your organization has set up content categories, click Assign categories and select up to 20 categories to help people find the item.

    You can also start typing a category name to narrow the list of categories.

  8. Optionally, type tags that describe the item.

    Separate the terms with commas (for example, Federal land is considered one tag; Federal, land is considered two tags).

    As you type, you can select any of the suggested tags that appear; suggestions are generated from tags you have added previously.

  9. Optionally, provide a summary that describes the item.
  10. Click Save.
  11. When the raster function template item page appears, click Yes to open the raster function editor.

    An empty function editor window appears.

    The function editor window is divided into two parts, with the available functions in a list and the raster function template 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 and manage the raster function template. 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.

  12. 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 choose an option for filtering the contents. For example, choose My Organization to find raster function templates that were created and shared by members of your organization.
    Caution:

    If you receive an error message indicating that the template could not be added in XML format, consider using the Convert Raster Function Template tool in ArcGIS Pro to convert the file format from RFT.XML to RFT.JSON. Once it is converted, you can add the new raster function template to your organization and use it.

  13. Click the Add Function button Add Function to add the raster function to the editor window.
  14. Double-click the raster function in the editor window to open the property window and view or modify the properties on the following tabs:
    • General—Provide a name and description for the function. This is useful when you create a raster function template with multiple functions. The name of the function can describe what the function does, so any member of your organization that uses the function template 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 used when the template is run.
    • 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 combination of processes.
      Note:

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

  15. Optionally, do any of the following to continue building the raster function template:
    • Add functions to the editor window and combine the processes.
    • 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 template.
    • Click the Add Raster Variable button Add Raster Variable to add a data source input to the raster function template.
    • Click the Add Constant button Add Constant to add a scalar constant value input to the raster function template.
    • Click the Delete Selected Items button Delete Selected Items to delete the item or items selected in the function editor window.

    To link two nodes, click and drag an edge of the raster function source node toward the target raster function node, creating a link between the two.

  16. When you finish building the raster function template, click Save or Save As to save it.

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

When you save the raster function template, it is saved as an item in My Content. You can share the item publicly or with members of your organization. To reuse the template, in the Analysis pane, click the Browse Raster Function Templates button Browse Raster Function Templates, and browse to the template.

Tip:

To make additional changes to the raster function template at any time, click Open in Raster Function Editor on the Overview tab of the raster function template item page.