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 content page. You can open the item page 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 a raster function template in ArcGIS Online by adding it as an item in your organization. From its item page, you can edit the raster function template 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 the privilege 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. Provide a title.
  6. Choose a folder in My content where you want to save the item.

    Alternatively, you can choose Create new folder from the menu and type a folder name to save the item in a new folder.

    Folder names cannot contain 4-byte Unicode characters.

  7. If your organization has set up content categories, click Assign categories and select up to 20 categories to help users 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, and Federal, land is considered two tags).

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

  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 tools in 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. Click the Add raster functions button Add raster functions to open the list of raster functions, and use the search bar to search for a specific raster function.
  13. Click the Add function button Add function to add the raster function to the Raster Function Editor window.
  14. Optionally, browse to an existing raster function template by doing the following:
    1. Click Add template Add template.

      The Browse Raster Function Templates window appears.

    2. Click My content, 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.
    3. Click Confirm to add the template to the Raster Function Editor window.
    Caution:

    A raster function template (an .rft.xml or .rft.json file) must be published as an item before it can be opened in the web-based Raster Function Editor window. Raster function templates created in ArcGIS Online are saved as .rft.jsonbased items. When you open an .rft.xml raster function template in the Raster Function Editor, it is first internally converted to an .rft.json file using the Convert Raster Function Template tool. Because of this, .rft.xml raster function templates may take more time to open. After you open an .rft.xml raster function template, consider saving it in your organization to reduce the time it takes to open it in the future.

  15. Double-click the raster function in the editor window to view or modify the properties on the following tabs:
    • General—Provide a name and description for the function. This information 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 raster 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—Turn on the IsPublic toggle button to expose a parameter as a variable when you open the raster function template to run it. Rename parameters in the Name column to provide additional context. For example, renaming the input raster parameter can be important when there are multiple raster inputs required for a combination of processes.
      Note:

      Previously, if none of the parameters in a raster function had the IsPublic toggle button turned on, all parameters were exposed as variables. This default behavior has changed. Now, if a raster function does not contain any parameters with the IsPublic toggle button turned on, no parameters will be exposed as variables when you open the raster function template to run it.

  16. Optionally, continue building the raster function template by doing any of the following:
    • Add more raster functions to the editor window and combine the processes.
    • Click the Edit template properties button Edit template 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 Pan button Pan to use the pointer in pan mode.
    • Click the Select button Select to use the pointer in selection mode.
    • Click the Auto layout button Auto layout to apply an automatic layout to 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.

    You can also modify the position of an individual raster function by hovering the pointer over it. When the pointer icon changes to the Move icon Move icon, drag the raster function to a new position in the Raster Function Editor window.

  17. 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 where it will be stored, as well as sharing options.

  18. 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 Raster Function Templates pane in Map Viewer, click Browse Raster Function Templates 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.