ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Train ISO Cluster Classifier

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Generate an Esri classifier definition (.ecd) file using the Iso Cluster classification definition.

The ISO Cluster classifier performs an unsupervised classification. This classifier can handle very large segmented images, whose attribute table can become large. Also, the tool can accept a segmented RGB raster from a third-party application. The tool works on standard Esri-supported raster files without restriction, as well as segmented raster datasets.

Usage

  • Any Esri-supported raster is accepted as input, including raster products, segmented raster, mosaics, image services or generic raster datasets. Segmented rasters must be 8-bit rasters with 3-bands.

  • The Segment Attributes parameter is enabled only if one of the raster layer inputs is a segmented image.

Syntax

TrainIsoClusterClassifier (in_raster, max_classes, out_classifier_definition, {in_additional_raster}, {max_iterations}, {min_samples_per_cluster}, {skip_factor}, {used_attributes})
ParameterExplanationData Type
in_raster

Select the raster dataset you want to classify.

The preferred input is a 3-band, 8-bit segmented raster dataset, where all the pixels in the same segment have the same color. The input can also be a 1-band 8-bit grayscale segmented raster. If no segmented raster is available, you can use any Esri-supported raster dataset

Raster Dataset | Mosaic Dataset | Raster Layer | Mosaic Layer | Image Service Layer
max_classes

Maximum number of desired classes to group pixels or segments.

Long
out_classifier_definition

This is a JSON file that contains attribute information, statistics, hyperplane vectors and other information needed for the classifier. A file with an .ecd extension is created.

File
in_additional_raster
(Optional)

Optionally incorporate ancillary raster datasets, such as a segmented image, a multispectral image, or a DEM, to generate attributes and other required information for classification.

Raster Dataset | Mosaic Dataset | Raster Layer | Mosaic Layer | Image Service Layer
max_iterations
(Optional)

Maximum number of iterations for the clustering process to run.

Long
min_samples_per_cluster
(Optional)

Minimum number of pixels or segments in a valid cluster or class.

Long
skip_factor
(Optional)

Number of pixels to skip for a pixel image input. If a segmented image is an input, specify the number of segments to skip.

Long
used_attributes
used_attributes;used_attributes
(Optional)

Specify the attributes to be included in the attribute table associated with the output raster.

This parameter is only enabled if the SEGMENTED key property is set to true on the input raster. If the only input into the tool is a segmented image, the default attributes are COLOR, COUNT, COMPACTNESS, and RECTANGULARITY. If an in_additional_raster is also included as an input along with a segmented image, then MEAN and STD are available as options.

  • COLOR —The average chromaticity color, on a per-segment basis.
  • MEAN —The average digital number (DN), derived from the optional pixel image, on a per-segment basis.
  • STD —The standard deviation, derived from the optional pixel image, on a per-segment basis.
  • COUNT —The number of pixels comprising the segment, on a per-segment basis.
  • COMPACTNESS —The degree to which a segment is compact or circular, on a per-segment basis. The values range from 0 to 1, where 1 is a circle.
  • RECTANGULARITY —The degree to which the segment is rectangular, on a per-segment basis. The values range from 0 to 1, where 1 is a rectangle.
String

Code Sample

TrainIsoClusterClassifier example 1 (Python window)

The following Python window script uses the ISO Cluster classifier to create an unsupervised Esri classification definition file with a maximum of ten classes.

import arcpy
from arcpy.sa import *

TrainIsoClusterClassifier("c:/test/moncton_seg.tif", "10", 
                "c:/output/moncton_sig_iso.ecd","c:/test/moncton.tif", 
                "5", "10", "2", "COLOR;MEAN;STD;COUNT;COMPACTNESS;RECTANGULARITY")
TrainIsoClusterClassifier example 2 (stand-alone script)

This script example uses the ISO Cluster classifier to create an unsupervised Esri classification definition file with a maximum of ten classes.

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


# Set local variables
inSegRaster = "c:/test/moncton_seg.tif"
maxNumClasses = "10"
out_definition = "c:/output/moncton_sig_iso.ecd"
in_additional_raster = "moncton.tif"
maxIteration = "20"
minNumSamples = "10"
skipFactor = "5"
attributes = "COLOR;MEAN;STD;COUNT;COMPACTNESS;RECTANGULARITY"

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

# Execute 
TrainIsoClusterClassifier(inSegRaster, maxNumClasses, out_definition,
                          in_additional_raster, maxIteration, 
                          minNumSamples, skipFactor, attributes)

Environments

  • Compression
  • Current Workspace
  • Extent
  • NoData
  • Output CONFIG Keyword
  • Output Coordinate System
  • Parallel Processing Factor
  • Pyramid
  • Raster Statistics
  • Scratch Workspace
  • Snap Raster

Licensing Information

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

Related Topics

  • An overview of the Segmentation and Classification toolset
  • What is image classification?
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal