Create Accuracy Assessment Points (Image Analyst)

Available with Spatial Analyst license.

Available with Image Analyst license.

Summary

Creates randomly sampled points for postclassification accuracy assessment.

A common practice is to randomly select hundreds of points and label their classification types by referencing reliable sources, such as field work or human interpretation of high-resolution imagery. The reference points are then compared with the classification results at the same locations.

Usage

  • This tool creates a set of random points and assigns a class to them based on reference data.

  • This tool can also assign a class to the set of points using a previously classified image or a feature class.

  • The accuracy assessment workflow usually uses the following three tools in this order: Create Accuracy Assessment Points, Update Accuracy Assessment Points, and Compute Confusion Matrix.

  • When a polygon feature class is used for training or accuracy assessment, the feature class must have a Classvalue or value field that has a unique integer value for each class. For example, a polygon feature class with three different classes can have values such as [1, 2, 3] or [10, 20, 40].

  • When the Input Raster or Feature Class Data parameter value is a multidimensional raster, the random points generated will use all images in the time series with a date field indicating the image the points are generated from. To generate points for a subset of images, use the Make Multidimensional Raster Layer tool to create an intermediate layer, or the Subset Multidimensional Raster tool to create an intermediate dataset before using this tool.

  • After running this tool, you can edit the table to manually assign a class to some or all of the points.

Parameters

LabelExplanationData Type
Input Raster or Feature Class Data

The input classification image or other thematic GIS reference data. The input can be a raster or feature class.

Typical data is a classification image of a single band, integer data type.

If using polygons as input, only use those that are not used as training samples. They can also be GIS land-cover data in shapefile or feature class format.

Raster Layer; Mosaic Layer; Feature Layer
Output Accuracy Assessment Points

The output point shapefile or feature class that contains the random points to be used for accuracy assessment.

Feature Class
Target Field
(Optional)

Specifies whether the input data is a classified image or ground truth data.

  • ClassifiedThe input is a classified image. This is the default.
  • Ground truthThe input is reference data.
String
Number of Random Points
(Optional)

The total number of random points that will be generated.

The actual number may exceed but never fall below this number, depending on sampling strategy and number of classes. The default number of randomly generated points is 500.

Long
Sampling Strategy
(Optional)

Specifies the sampling scheme that will be used.

  • Stratified randomRandomly distributed points will be created in each class, in which each class has a number of points proportional to its relative area. This is the default
  • Equalized stratified randomRandomly distributed points will be created in each class, in which each class has the same number of points.
  • RandomRandomly distributed points will be created throughout the image.
String
Dimension Field for Feature Class
(Optional)

A field that defines the dimension (time) of the features. This parameter is used only if the classification result is a multidimensional raster and you want to generate assessment points from a feature class, such as land classification polygons for multiple years.

Field

CreateAccuracyAssessmentPoints(in_class_data, out_points, {target_field}, {num_random_points}, {sampling}, {polygon_dimension_field})
NameExplanationData Type
in_class_data

The input classification image or other thematic GIS reference data. The input can be a raster or feature class.

Typical data is a classification image of a single band, integer data type.

If using polygons as input, only use those that are not used as training samples. They can also be GIS land-cover data in shapefile or feature class format.

Raster Layer; Mosaic Layer; Feature Layer
out_points

The output point shapefile or feature class that contains the random points to be used for accuracy assessment.

Feature Class
target_field
(Optional)

Specifies whether the input data is a classified image or ground truth data.

  • CLASSIFIEDThe input is a classified image. This is the default.
  • GROUND_TRUTHThe input is reference data.
String
num_random_points
(Optional)

The total number of random points that will be generated.

The actual number may exceed but never fall below this number, depending on sampling strategy and number of classes. The default number of randomly generated points is 500.

Long
sampling
(Optional)

Specifies the sampling scheme that will be used.

  • STRATIFIED_RANDOMRandomly distributed points will be created in each class, in which each class has a number of points proportional to its relative area. This is the default
  • EQUALIZED_STRATIFIED_RANDOMRandomly distributed points will be created in each class, in which each class has the same number of points.
  • RANDOMRandomly distributed points will be created throughout the image.
String
polygon_dimension_field
(Optional)

A field that defines the dimension (time) of the features. This parameter is used only if the classification result is a multidimensional raster and you want to generate assessment points from a feature class, such as land classification polygons for multiple years.

Field

Code sample

CreateAccuracyAssessmentPoints example 1 (stand-alone script)

This example creates random points for accuracy assessment.

import arcpy
from arcpy.ia import *

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

CreateAccuracyAssessmentPoints("c:\\test\\cls.tif", "c:\\test\\apnt1.shp", 
                               "COMPUTED", "1500", "RANDOM")

Licensing information

  • Basic: Requires Image Analyst or Spatial Analyst
  • Standard: Requires Image Analyst or Spatial Analyst
  • Advanced: Requires Image Analyst or Spatial Analyst

Related topics