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.
This functionality is currently only supported in Map Viewer Classic. It will be available in a future release of Map Viewer.
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.
- 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.
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.
Click the Open in Raster Function Editor button on the item details page to open and display the raster function template in the editor.
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:
- Verify that you are signed in and have the privileges to create content and perform imagery analysis.
- Open a new or existing map in Map Viewer Classic.
- Click the Analysis tab to open the Perform Analysis pane, then select Raster Analysis.
- Click the Raster Function Editor button .
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.
- 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.
- When you have found the raster function or function template you want to use, click the Add Function button to add the raster function to the editing window.
- 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.
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.
- 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 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 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 to apply an automatic layout for the raster function chain.
- Click the Add Raster Variable button to add a data source input to the raster function chain.
- Click the Add Constant button to add a scalar constant value input to the raster function chain.
- Click the Delete Selected Items button 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.
- 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.
- 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.
- 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.
- 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 .
Edit an existing raster function template
To edit and apply an existing raster function template, complete the following steps:
- Follow steps 1 through 3 above.
- In the Raster Analysis pane, click the Browse Raster Function Templates button .
The Custom Analysis Tools content window appears.
- In the Filter panel, click Item Type > Raster Function Templates to display a list of saved raster function templates.
- 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.
- Click Save As to save it as a new raster function template, or click Save to overwrite the existing raster function template.