Edit Signatures (Spatial Analyst)

Summary

Edits and updates a signature file by merging, renumbering, and deleting class signatures.

Learn more about how Edit Signatures works

Usage

Syntax

EditSignatures (in_raster_bands, in_signature_file, in_signature_remap_file, out_signature_file, {sample_interval})
ParameterExplanationData Type
in_raster_bands
[in_raster_band,...]

The input raster bands for which to edit the signatures.

Raster Layer
in_signature_file

Input signature file whose class signatures are to be edited.

A .gsg extension is required.

File
in_signature_remap_file

Input ASCII remap table containing the class IDs to be merged, renumbered, or deleted.

The extension can be .rmp, .asc or .txt. The default is .rmp.

File
out_signature_file

The output signature file.

A .gsg extension must be specified.

File
sample_interval
(Optional)

The interval to be used for sampling.

The default is 10.

Long

Code Sample

EditSignatures example 1 (Python window)

This example will edit the signature file based on the input remap file.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
EditSignatures("redl123", "c:/sapyexamples/data/zsamp12.gsg", 
               "c:/sapyexamples/data/zsamp7.rmp", 
               "c:/sapyexamples/output/redlremap.gsg", "")
EditSignatures example 2 (stand-alone script)

This example will edit the signature file based on the input remap file.

# Name: EditSignatures_Ex_02.py
# Description: Edits and updates a signature file by merging, renumbering, 
#    and deleting class signatures.
# Requirements: Spatial Analyst Extension
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inRaster = "redl123"
oldSig = "c:/sapyexamples/data/zsamp12.gsg"
sigRemap = "c:/sapyexamples/data/zsamp7.rmp"
outNewSig = "c:/sapyexamples/output/redlsig.gsg"
interval = ""

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute EditSignatures
EditSignatures(inRaster, oldSig, sigRemap, outNewSig, interval)

Environments

Related Topics

Licensing Information

ArcView: Requires Spatial Analyst
ArcEditor: Requires Spatial Analyst
ArcInfo: Requires Spatial Analyst

6/29/2011