Summary
Adds, replaces, or removes a function chain in a mosaic dataset or a raster layer that contains a raster function.
Usage
To apply the rft.xml to items in a mosaic dataset, you must select the items in the attribute table or define a query using the Make Mosaic Layer tool.
The Raster Function Template Editor tool can be added to any toolbar using the Customized Mode window. The tool is located under the Command tab within the Raster category. To save out a raster function template, click File and click Save; this will save an rft.xml file.
Database fragmentation and frequent data manipulation may increase the size of your mosaic dataset dramatically. If your database size is inflated due to constant transactions, you should run the Compact tool.
Syntax
EditRasterFunction_management (in_mosaic_dataset, {edit_mosaic_dataset_item}, {edit_options}, {function_chain_definition}, {location_function_name})
Parameter | Explanation | Data Type |
in_mosaic_dataset | The mosaic dataset or a raster layer. If you use a raster layer, it must have a function applied. | Mosaic Layer; Raster Layer |
edit_mosaic_dataset_item (Optional) | Determines if edits affect functions or the entire mosaic dataset.
| Boolean |
edit_options (Optional) | Insert, replace, or remove a function chain.
| String |
function_chain_definition (Optional) | Choose the function chain (rft.xml file) that you want to insert or replace. | File |
location_function_name (Optional) | Choose where to insert, replace, or remove the function chain within the existing function chain. | 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
Licensing information
- ArcGIS for Desktop Basic: No
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes