Edit Raster Function (Data Management)

License Level:BasicStandardAdvanced

Summary

Adds, replaces, or removes a raster function template to a mosaic dataset, items in a mosaic dataset, or a raster layer that contains a raster function. A raster function template defines a raster function chain. The template is stored as an rft.xml file, which can be exported from the Raster Function Editor.

Usage

Syntax

EditRasterFunction_management (in_mosaic_dataset, {edit_mosaic_dataset_item}, {edit_options}, {function_chain_definition}, {location_function_name})
ParameterExplanationData Type
in_mosaic_dataset

The input can be a mosaic dataset or a raster layer that contains a raster function.

Mosaic Layer; Raster Layer
edit_mosaic_dataset_item
(Optional)

Choose whether to edit the mosaic dataset items.

  • EDIT_MOSAIC_DATASETThe edits will affect the functions associated with the mosaic dataset. This is the default.
  • EDIT_MOSAIC_DATASET_ITEMThe edits will affect the functions associated with the mosaic dataset items.
Boolean
edit_options
(Optional)

Choose whether to insert a new raster function, replace an existing raster function chain, or remove the existing one.

  • INSERTInsert the functions above the location_function_name of the existing chain. The Raster Function Chain must be supplied in order to use this option. This is the default.
  • REPLACE Replace the existing function chain with the Raster Function Template specified in this tool. The Raster Function Chain must be supplied in order to use this option.
  • REMOVERemove the existing raster function chain.
String
function_chain_definition
(Optional)

The raster function template file (rft.xml). A raster function chain can be exported from the Raster Function Template Editor.

File
location_function_name
(Optional)

The name of the function where the edits will take place.

If you INSERT the function, then it will be inserted above the location_function_name. If you REPLACE the function, then it will replace the function that has been selected. If you REMOVE the function, then it will remove the function that has been selected.

String

Code Sample

EditRasterFunction example 1 (Python window)

This is a Python sample for EditRasterFunction.

import arcpy
arcpy.EditRasterFunction_management(
     "C:/Workspace/editfunction.gdb/md", "EDIT_MOSAIC_DATASET", 
     "INSERT", "C:/workspace/hillshade.rft.xml", "Stretch Function")
EditRasterFunction example 2 (stand-alone script)

This is a Python script sample for EditRasterFunction.

#Add raster function on top of mosaic dataset

import arcpy
arcpy.env.workspace = "C:/Workspace"

mdname = "editfunction.gdb/md"
editmode = "EDIT_MOSAIC_DATASET"
editmethod = "INSERT"
funcfile = "C:/workspace/hillshade.rft.xml"
funcname = "#"

arcpy.EditRasterFunction_management(mdname, editmode, editmethod, 
                                    funcfile, funcname)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015