Dendrogram (Spatial Analyst)

License Level:BasicStandardAdvanced

Summary

Constructs a tree diagram (dendrogram) showing attribute distances between sequentially merged classes in a signature file.

Learn more about how Dendrogram works

Usage

Syntax

Dendrogram (in_signature_file, out_dendrogram_file, {distance_calculation}, {line_width})
ParameterExplanationData Type
in_signature_file

Input signature file whose class signatures are used to produce a dendrogram.

A .gsg extension is required.

File
out_dendrogram_file

The output dendrogram ASCII file.

The extension can be .txt or .asc.

File
distance_calculation
(Optional)

Specifies the manner in which the distances between classes in multidimensional attribute space are defined.

  • VARIANCE The distances between classes will be computed based on the variances and the Euclidean distance between the means of their signatures.
  • MEAN_ONLY The distances between classes will be determined by the Euclidean distances between the means of the class signatures only.
Boolean
line_width
(Optional)

Sets the width of the dendrogram in number of characters on a line.

The default is 78.

Long

Code Sample

Dendrogram example 1 (Python window)

This example takes an input signature file and creates a Dendrogram view.

import arcpy
from arcpy.sa import *
Dendrogram("c:/sapyexamples/data/zsamp12.gsg", 
           "c:/sapyexamples/output/z12dendro.txt", "VARIANCE", "")
Dendrogram example 2 (stand-alone script)

This example takes an input signature file and creates a Dendrogram view.

# Name: Dendrogram_Ex_02.py
# Description: Constructs a tree diagram showing attribute distances between
#     sequentially merged classes in a signature file.
# Requirements: Spatial Analyst Extension

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

# Set local variables
inSig = "c:/sapyexamples/data/zsamp12.gsg"
outDendro = "c:/sapyexamples/output/z12dend.txt"
lineLength = ""

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

# Execute Dendrogram
Dendrogram(inSig, outDendro, "VARIANCE", lineLength)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires Spatial Analyst
ArcGIS for Desktop Standard: Requires Spatial Analyst
ArcGIS for Desktop Advanced: Requires Spatial Analyst
11/8/2012