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.
When you save a raster function template, it is stored as an item on your My Contents 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 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:
- Verify that you are signed in to your organization and have privileges to create content.
- At the top of the site, click Content.
- From the My Content tab of the content page, click New item.
- In the New item window, click Raster function template.
- Provide a title.
- 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.
- 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.
- 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 select any of the suggested tags that appear; suggestions are generated from tags you previously added.
- Optionally, provide a summary that describes the item.
- Click Save.
- 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.
- 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.
- Click the Add Function button to add the raster function to the editor window.
- 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.
- 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 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 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 to apply an automatic layout for the raster function template.
- Click the Add Raster Variable button to add a data source input to the raster function template.
- Click the Add Constant button to add a scalar constant value input to the raster function template.
- Click the Delete Selected Items button 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 the individual raster functions by hovering the cursor over the individual raster functions to see the cursor icon change to indicate you can click the cursor and drag the raster function to a new position within the raster function editor.
- 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 , 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.