Disponible con licencia de Image Analyst.

Disponible con una licencia de Spatial Analyst.


Classifies a raster dataset based on an Esriclassifier definition file (.ecd) and raster dataset inputs.


For more information about how this function works, see the Classify raster function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.


Classify (raster1, {raster2}, classifier_definition)
ParámetroExplicaciónTipo de datos

The input raster to be classified.


An optional raster dataset to incorporate into the classifier, such as a segmented image, multispectral image, or elevation data, used to generate a more robust classification definition for your dataset.

The raster dataset for this parameter must match the one used to create the input Esri Classifier Definition file.


The path to the Esri Classifier Definition file (.ecd) that contains the statistics and other classification information for the specific dataset, classifier, and chosen attributes.

(El valor predeterminado es None)

Valor de retorno
Tipo de datosExplicación

The classified raster object.

Muestra de código

Classify example

Classifies a multispectral raster based on an Esri classifier definition file (.ecd).

from import *
out_classify_raster = Classify("NAIP.tif",None,
Classify example

Classifies a multispectral raster based on an Esri classifier definition file (.ecd).

# Import system modules
import arcpy
from import *

# Check out the ArcGIS Spatial Analyst extension license

# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"

# Set the local variables
raster1 = "QuickBird_4bands.tif"
raster2 = None
classifier_definition = "C:/arcpyExamples/data/tree_crown_classification_training_2classes_4b16b_ntree50.ecd"

# Apply Classify function
classified_raster = Classify(raster1, raster2, classifier_definition)

# Save the output"C:/arcpyExamples/outputs/Vegetation_landcover.crf")

Temas relacionados