ArcPy provides a number of classes to better support workflows using Python.
In addition to the classes listed in this topic, additional classes can be found in other ArcPy modules, including the following:
- Charts module (arcpy.charts)
- Data Access module (arcpy.da)
- Geocoding module (arcpy.geocoding)
- Image Analysis module (arcpy.ia)
- Mapping module (arcpy.mp)
- Metadata module (arcpy.metadata)
- Network Analyst modules (arcpy.nax and arcpy.na)
- Sharing module (arcpy.sharing)
- Spatial Analyst module (arcpy.sa)
- Workflow Manager (Classic) module (arcpy.wmx)
Learn more about using classes in Python
Chart classes
Class | Description |
---|---|
The Chart class defines an ArcGIS Pro chart. The class allows you to create various types of charts, including bar charts, line charts, scatterplots, scatterplot matrices, QQ plots, histograms, box plots, and data clocks. The class can also be used to define the chart title, axes, and other properties. |
Cursor classes
Class | Description |
---|---|
A cursor is a data access object that can be used either to iterate through the set of rows in a table or to insert new rows into a table. Cursors have three forms: search, insert, or update. Cursors are commonly used to read and update attributes. | |
The Row object represents the row of a table. The Row object is returned from InsertCursor, SearchCursor, and UpdateCursor. |
Exception classes
Class | Description |
---|---|
The ExecuteError exception class is raised whenever a geoprocessing tool encounters an error. | |
The ExecuteWarning exception class is raised when a geoprocessing tool encounters a warning, and the SetSeverityLevel function has updated the severity level to 1. Setting the severity level to 1 instructs arcpy to throw the ExecuteWarning exception when a warning is encountered. |
Environment classes
Class | Description |
---|---|
Environment settings are exposed as properties on the env class. Geoprocessing environment settings can be thought of as additional parameters that affect a tool's results. | |
EnvManager is a class for managing geoprocessing environments. |
Feature set and record set classes
Class | Description |
---|---|
FeatureSet objects are a lightweight representation of a feature class. They are a data element that contains not only schema, but also the data. The FeatureSet object is also how feature data is sent and received from the server. | |
RecordSet objects are a lightweight representation of a table. They are a data element that contains not only schema, but also the data. The RecordSet object is also how tables are sent and received from the server. |
Field classes
Class | Description |
---|---|
The field object represents a column in a table. A field has many properties, the most obvious ones being its name and its type. | |
Provides field info methods and properties for layer and table views. | |
The FieldMap object provides a field definition and a list of input fields taken from a set of tables or feature classes. | |
The FieldMappings object is a collection of FieldMap objects and it is used as the parameter value for tools that perform field mapping, such as Merge. |
General classes
Class | Description |
---|---|
The ArcSDESQLExecute class provides a means of executing SQL statements via an enterprise geodatabase connection. | |
The array object can contain points and arrays and is used to construct geometry objects. | |
An extent is a rectangle specified by providing the coordinate of the lower left corner and the coordinate of the upper right corner in map units. | |
The Index object contains information about an index on a table. There are two types of indexes: spatial and attribute. Spatial indexes exist on the shape field of a feature class. | |
The network Common Data Form (netCDF) is a binary, self-describing, machine-independent file format for storing scientific data. | |
Determines the type and seed that will be used to create random numbers. | |
Creates a raster object that can be used in Python or in a Map Algebra expression. A raster object is a variable that references a raster dataset. | |
Defines a RasterInfo object that describes a set of raster properties to facilitate the creation of a raster dataset using the Raster class. | |
A Result object is returned by geoprocessing tools. | |
Each part of the spatial reference has a number of properties (especially the coordinate system) that defines what map projection options are used to define horizontal coordinates. | |
A value table is a flexible table-like object, made up of rows and columns containing various values. | |
Provides information about the vertical coordinate system (VCS) component of a SpatialReference object. |
Geometry classes
Class | Description |
---|---|
Geometry objects define a spatial location and an associated geometric shape. | |
A Multipoint object is an ordered collection of points. | |
A representation of an x,y pair, optionally with measure, height, and ID attributes. | |
A PointGeometry object is a shape that has neither length nor area at a given scale. | |
A Polygon object is a closed shape defined by a connected sequence of x,y coordinate pairs. | |
A Polyline object is a shape defined by one or more paths, in which a path is a series of connected segments. |
Geostatistical Analyst classes
Class | Description |
---|---|
The CrossValidationResult class is returned by the Cross Validation tool and contains access to the cross-validation results that can be generated for any geostatistical layer. | |
The GeostatisticalDatasets class is used to manage datasets associated with a geostatistical model source. A geostatistical model source must be a geostatistical layer. | |
The SearchNeighborhoodSmooth class can be used to define the search neighborhood for IDW, Local Polynomial Interpolation and Radial Basis Functions (only when the INVERSE_MULTIQUADRIC_FUNCTION keyword is used). The smooth search neighborhood class accepts inputs for a minor and major axis, the size of the search ellipse, the angle of the search ellipse, and a smoothing factor. | |
The SearchNeighborhoodSmoothCircular class can be used to define the search neighborhood for Empirical Bayesian Kriging, IDW, Local Polynomial Interpolation, and Radial Basis Functions (only when the INVERSE_MULTIQUADRIC_FUNCTION keyword is used). The class accepts inputs for the radius of the searching circle and a smoothing factor. | |
The SearchNeighborhoodStandard class can be used to define the search neighborhood for IDW, Local Polynomial Interpolation, and Radial Basis Functions. | |
The SearchNeighborhoodStandard3D class can be used to define the three dimensional search neighborhood for the Empirical Bayesian Kriging 3D tool. | |
The SearchNeighborhoodStandardCircular class can be used to define the search neighborhood for Empirical Bayesian Kriging, IDW, Local Polynomial Interpolation, and Radial Basis Functions. |
Parameter classes
Class | Description |
---|---|
The filter object allows you to specify the choices available for a parameter. | |
Every tool parameter has an associated Parameter object with properties and methods that are useful in tool validation. | |
The schema of a dataset. | |
A Value object is returned from GetParameterInfo when used in a script tool's ToolValidator class, and from the GetParameter function depending on the parameter type. |