Skip To Content

Perform server-side processing with raster functions

Image services support server-side processing through some default functions that are supported through REST, but also by publishing image services and associated raster function templates that can be accessed and used through REST and ArcGIS Desktop applications, such as ArcGIS Pro.

To implement the raster function template (.rft.xml), you must first create it using the raster Function Editor tool in ArcGIS Pro, and add the .rft.xml file to the image service when it is published. When publishing the .rft.xml file with an image service, the functions defined within a raster function template can be applied only to the contents within an image service. The template cannot use data from another input.

Using REST to perform server-side processing on image services is useful when creating web applications that offer image services that were processed with different methods, or when applications cannot perform the processing, for example:

  • If the image service contains imagery, such as Landsat, a web application can be created to perform an NDVI using the red and near-infrared bands.
  • If the image service is a DEM, a web application can be created to allow the user to view the image service as a hillshade, slope, or shaded relief image.

REST supports basic functions on image services, including aspect, color map, NDVI, slope, shaded relief, hillshade, statistics, and stretch. You can extend these capabilities by publishing an image service with an .rft.xml file where you can chain the raster functions together to create the processing result you need.

Applying raster function templates to an image service containing functions, such as stretch, is useful when the image services will be used in web applications. Web applications are often unable to enhance imagery, so they rely on server-side processing. In this situation, when you add a raster function template to the image service, you can apply it by default.

Access the raster Function Editor

Complete the following steps to access the raster Function Editor from the Imagery tab in ArcGIS Pro:

  1. In ArcGIS Pro, click the Imagery tab on the ribbon to open the Imagery tools.
  2. From the Analysis group on the Imagery tab, click the Function Editor button to open the Function Editor pane.
    Note:

    You can also access the Function Editor tool by right-clicking an image layer in the Contents pane and clicking the Edit Function Chain button.

Create a raster function template

You can create a raster function template in the Function Editor pane.

  1. Once you have accessed the Function Editor pane, you can create a raster function template.

    With the Function Editor pane visible, you can add raster functions to the editor.

  2. Click the Raster Functions button to open the Raster Functions pane.
  3. The Raster Functions pane contains all the raster functions that are available to be added to the editor. The complete list of raster functions can be found in the web help for Raster Functions.
  4. Add a raster function by right-clicking the raster function and choosing Add to the Function Editor or dragging the raster function from the Raster Function pane to the Raster Function Template Editor.
  5. When the raster functions are added to the editor, you can connect them to each other to create complete raster analysis workflows.
  6. If necessary, continue adding additional raster functions to the editor.
  7. When all the required raster functions are added to the editor, hover over the raster function to be chained to another raster function.

    The connection points appear.

    Raster function connections
    The connection hooks are visible next to the Raster and Out labels in the function.
  8. Once the raster function template is completed, click the Save button.

    The Save dialog box appears and allows you to add more information about the raster function template.

    1. For Name, type a name for the raster function template.
    2. Choose Project or Custom to specify whether the raster function template is part of a project or a custom template.

      This selection controls where the raster function template is located on disk. For example, if the Project option is chosen, the raster function template will be located in the ArcGIS project you created.

    3. Type additional information about the raster function template in the Description box.
    4. Click OK to save the raster function template.

Add a raster function template to an image service

Once the raster function template has been created, you can add it as a processing template for image services in several ways. The raster function template can be added during the creation of the image service, when updating an existing image service, or to the mosaic dataset used in the creation of the image service.

Create an image service

During the creation of the image service, you can add a raster function template to the image service to provide visualization options for the image service and change the default visualization.

  1. In the Catalog pane in ArcGIS Pro, right-click the image to be used for the image service and choose Share As Web Layer to open the Share As Web Layer pane.
  2. Click the Configuration tab and click the Configure Web Properties button Editing next to the Imagery layer to edit the image service properties.
  3. The properties listed here control many aspects of the image service, including the operations, mosaic options, and raster functions.
  4. Expand the Raster Functions section and click the Add processing templates button Add a Locate Provider.
  5. On the Select raster function template(s) dialog box, browse to the location of the raster function template.
  6. Click OK to accept the processing templates.
  7. In the Processing templates section, the added processing templates should appear with the full path location of the raster function template.
  8. If necessary, in the Default template drop-down menu, choose the new processing template. Changing the default template from None modifies how the image service displays by default. The processing templates can appear as options when displaying the image service.
  9. Once complete, continue modifying the web layer options and publish the image service.

Update an image service

After the image service is created, you can modify the image service by adding a raster function template to provide visualization options for the image service and change the default visualization.

  1. In the Catalog pane in ArcGIS Pro, browse to and right-click the existing image service, or any file to be used for the image service, and choose Overwrite Web Layer to open the Overwrite Web Layer pane.
  2. Tip:

    When prompted with the warning about overwriting, accept the warning.

  3. Click the Configuration tab and click the Configure Web Properties button Editing next to the Imagery layer to edit the image service properties.
  4. The properties listed here control many aspects of the image service, including the operations, mosaic options, and raster functions.
  5. Expand the Raster Functions section and click the Add processing templates button Add a Locate Provider.
  6. On the Select raster function template(s) dialog box, browse to the location of the raster function template.
  7. Click OK to accept the processing templates.
  8. In the Processing templates section, the added processing templates should appear with the full path location of the raster function template.
  9. If necessary, in the Default template drop-down menu, choose the new processing template. Changing the default template from None modifies how the image service displays by default. The processing templates can appear as options when displaying the image service.
  10. Once complete, continue modifying the web layer options and republish the image service.

Add to a mosaic dataset

Image services created from mosaic datasets inherit display settings and other defaults from the mosaic dataset. Raster function templates can be added to the mosaic dataset prior to publishing to add the processing templates as additional display options or to change the default display.

  1. In the Catalog pane in ArcGIS Pro, browse to the mosaic dataset, right-click it to open the available options, and choose Manage Processing Templates.
  2. In the Manage Processing Templates pane, the templates currently used in the mosaic dataset are visible. If there are no processing templates added to the mosaic dataset, None is the only visible processing template.

  3. Click the Import button Import to choose the processing template to be used and browse to the location of the created processing template.
  4. Note:

    If you do not have any processing templates created for the mosaic dataset, click the Properties button options and choose Create a New Template, and the Function Editor pane appears, where you can create a template.

  5. Choose the raster function template you want to add to the mosaic dataset and click OK.
  6. The raster processing template appears in the pane under the Templates section.
  7. Continue adding the processing templates until all have been added.
  8. Close the Manage Processing Templates pane.