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.
Database fragmentation and frequent data manipulation can dramatically increase the size of your mosaic dataset. If your database size is inflated due to constant transactions, run the Compact tool.
Syntax
EditRasterFunction(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 |
Derived Output
Name | Explanation | Data Type |
out_raster | The updated mosaic dataset. | Mosaic Layer; Raster Layer |
Code sample
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")
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
- Basic: No
- Standard: Yes
- Advanced: Yes