Skip To Content

Edit Signatures

Available with Spatial Analyst license.

Summary

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

Learn more about how Edit Signatures works

Usage

  • The Edit Signatures tool allows the modification of an existing signature file by all or any of the following operations:

    • Merging signatures of a set of classes
    • Renumbering a signature class ID
    • Deleting unwanted signatures
  • The input signature file must be an ASCII signature file. The file can be the output of any Multivariate tool that produces the file containing the required statistical information—for example, Iso Cluster and Create Signatures. The file must have a minimum of two classes. Such a file can be recognized by its .gsg extension.

  • The input signature remap file is an ASCII file consisting of two columns of values per line, separated by a colon. The first column is the value of the original class ID. The second column contains the new class IDs for updating in the signature file. All of the entries in the file must be sorted in ascending order based on the first column

    In certain cases, some of your desired classes may be statistically too similar to each other, therefore, assignment of cells to the unique classes may not be reliable. For example, you may have wanted a wetland class and a separate class for forest wetland. However, these two classes cannot be easily distinguished from one another. In this case, you may want to merge the forest wetland class into the more general wetland class. Alternatively, if there is no statistical difference between the classes, you can remove one of them altogether since they both essentially represent the same class.

    To merge a set of classes, put the same new class ID for the second value for each class ID of that set. Only classes that need to be edited have to be placed in the signature remap file; any class not present in the remap file will remain unchanged. To delete a class signature, use -9999 as the value for the second column of that class. A class ID can also be renumbered to a value that does not exist in the input signature file.

    The following is an example of an input signature remap file:

    2 : 3
    4 : 11
    5 : -9999
    9 : 3

    This example will merge classes 2 and 9 with 3, merge class 4 with 11, and delete class 5.

  • If the input signature file carries names for the class signatures and if the signatures in the input signature remap file are to be merged, the name associated with the value in which to merge will be transferred to the output signature file.

  • If the input is a layer created from a multiband raster with more than three bands, the operation will consider all the bands associated with the source dataset, not just the three bands that were loaded (symbolized) by the layer.

  • There are several ways you can specify a subset of bands from a multiband raster to use as input into the tool.

    • If using the tool dialog box, browse to the multiband raster using the browse Add Data button next to Input raster bands, open the raster, and select the desired bands.
    • If the multiband raster is a layer in the Contents, you can use the Make Raster Layer tool to create a new multiband layer containing only the desired bands.
    • You can also create a new dataset that contains only the desired bands with Composite Bands and use the resulting dataset as input to the tool.
    • In Python, the desired bands can be directly specified in the tool parameter as a list.
  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

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.

They can be integer or floating point type.

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

# 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 = ""

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

Licensing information

  • ArcGIS Desktop Basic: Requires Spatial Analyst
  • ArcGIS Desktop Standard: Requires Spatial Analyst
  • ArcGIS Desktop Advanced: Requires Spatial Analyst

Related topics