ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Edit Raster Function

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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 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_management (in_mosaic_dataset, {edit_mosaic_dataset_item}, {edit_options}, {function_chain_definition}, {location_function_name})
ParameterExplanationData 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.

  • EDIT_MOSAIC_DATASET —Edits affect the functions associated with the mosaic dataset. This is the default.
  • EDIT_MOSAIC_DATASET_ITEM —Edits affect the functions associated with all of the items within the mosaic dataset.
Boolean
edit_options
(Optional)

Insert, replace, or remove a function chain.

  • INSERT —Insert the function chain above the Function Name of the existing chain. Specify the function chain in the location_function_name parameter. This is the default.
  • REPLACE —Replace the existing function chain with the function chain specified in this tool. Specify the function chain below in the location_function_name parameter.
  • REMOVE — Remove the function chain starting from the function specified in the location_function_name parameter.
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

  • Current Workspace

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics

  • An overview of the Raster toolset
  • Environment settings for raster data
  • What are the functions used by a raster or mosaic dataset?
  • Accessing the Raster Function Template Editor
  • Editing function chains in a mosaic dataset
  • Editing function chain templates

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2017 Esri. | Privacy | Legal