Iso Cluster Unsupervised Classification (Spatial Analyst)

License Level:BasicStandardAdvanced

Summary

Performs unsupervised classification on a series of input raster bands using the Iso Cluster and Maximum Likelihood Classification tools.

Learn more about how the Interactive Supervised Classification tool works

Usage

Syntax

IsoClusterUnsupervisedClassification (Input_raster_bands, Number_of_classes, {Minimum_class_size}, {Sample_interval}, {Output_signature_file})
ParameterExplanationData Type
Input_raster_bands
[in_raster_band,...]

The input raster bands.

Raster Layer
Number_of_classes
number_of_classes

Number of classes into which to group the cells.

Long
Minimum_class_size
minimum_class_size
(Optional)

Minimum number of cells in a valid class.

The default is 20.

Long
Sample_interval
sample_interval
(Optional)

The interval to be used for sampling.

The default is 10.

Long
Output_signature_file
out_signature_file
(Optional)

The output signature file.

A .gsg extension must be specified.

File

Return Value

NameExplanationData Type
Output_classified_raster

The output classified raster.

Raster

Code Sample

IsoClusterUnsupervisedClassification example 1 (Python window)

This example performs an unsupervised classification classifying the input bands into 5 classes and outputs a classified raster.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outUnsupervised = IsoClusterUnsupervisedClassification("redlands", 5, 20, 50)
outUnsupervised.save("c:/temp/unsup01")
IsoClusterUnsupervisedClassification example 2 (stand-alone script)

This example performs an unsupervised classification classifying the input bands into 5 classes and outputs a classified raster.

# Name: IsoClusterUnsupervisedClassification_Ex_02.py
# Description: Uses an isodata clustering algorithm to determine the 
#    characteristics of the natural groupings of cells in multidimensional 
#    attribute space and stores the results in an output ASCII signature file.
# 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 = "redlands"
classes = 5
minMembers = 50
sampInterval = 15

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

# Execute IsoCluster
outUnsupervised = IsoClusterUnsupervisedClassification(inRaster, classes, minMembers, sampInterval)
outUnsupervised.save("c:/temp/outunsup01.tif")

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