Parameter data types in a Python toolbox
In a Python toolbox, the parameter's datatype property is set using the Parameter class in the getParameterInfo method.
def getParameterInfo(self):
# Define parameter definitions
# First parameter
param0 = arcpy.Parameter(
displayName="Input workspace",
name="in_workspace",
datatype="DEWorkspace",
parameterType="Required",
direction="Input")
Composite data types
You may need a parameter to accept multiple data types, often referred to as a composite data type. In a Python toolbox, composite data types are defined by assigning a list of data types to the parameter's datatype property. In the following example, a parameter that accepts a raster dataset or a feature class is defined:
def getParameterInfo(self):
# Define parameter definitions
# First parameter
param0 = arcpy.Parameter(
displayName="Input Raster Dataset",
name="in_rasterdataset",
datatype=["DERasterDataset", "DEFeatureClass"],
parameterType="Required",
direction="Input")
Data types
Every tool parameter has an associated data type as shown in the following table:
|
Data type |
|
Description |
|---|---|---|
|
3D Tiles Layer |
|
A 3D tiles layer references a tile set that defines an integrated mesh or 3D object type data in a hierarchical data structure. |
|
Address Locator |
|
A dataset used for geocoding that stores the address attributes, associated indexes, and rules that define the process for translating nonspatial descriptions of places to spatial data. |
|
Analysis Cell Size |
|
The cell size used by raster tools. |
|
Any Value |
|
A data type that accepts any value. |
|
ArcMap Document |
|
A file that contains one map, its layout, and its associated layers, tables, charts, and reports. |
|
Areal Unit |
|
An areal unit type and value, such as square meter or acre. |
|
Boolean |
|
A Boolean value. |
|
CAD Drawing Dataset |
|
A vector data source combined with feature types and symbology. The dataset cannot be used for feature class-based queries or analysis. |
|
Calculator Expression |
|
A calculator expression. |
|
Catalog Layer |
|
A collection of references to different data types. The data types can be from different locations and are managed and visualized dynamically as layers based on location, time, and other attributes. |
|
Catalog Root |
|
The top-level node in the Catalog tree. |
|
Cell Size |
|
The cell size used by the ArcGIS Spatial Analyst extension. |
|
Cell Size XY |
|
The size that defines the two sides of a raster cell. |
|
Composite Layer |
|
A reference to several children layers, including symbology and rendering properties. |
|
Compression |
|
The type of compression used for a raster. |
|
Coordinate System |
|
A reference framework, such as the UTM system consisting of a set of points, lines, or surfaces, and a set of rules used to define the positions of points in two- and three-dimensional space. |
|
Coordinate Systems Folder |
|
A folder on disk that stores coordinate systems. |
|
Coverage |
|
A coverage dataset, which is a proprietary data model for storing geographic features as points, arcs, and polygons with associated feature attribute tables. |
|
Coverage Feature Class |
|
A coverage feature class, such as point, arc, node, route, route system, section, polygon, and region. |
|
Data Element |
|
A dataset visible in ArcCatalog. |
|
Data File |
|
A data file. |
|
Database Connections |
|
The database connection folder in ArcCatalog. |
|
Dataset |
|
A collection of related data, usually grouped or stored together. |
|
Date |
|
A date value. |
|
dBASE Table |
|
Attribute data stored in dBASE format. |
|
Decimate |
|
A subset of nodes of a TIN to create a generalized version of that TIN. |
|
Diagram Layer |
|
A diagram layer. |
|
Disk Connection |
|
An access path to a data storage device. |
|
Double |
|
Any floating-point number stored as a double precision, 64-bit value. |
|
Encrypted String |
|
An encrypted string for passwords. |
|
Envelope |
|
The coordinate pairs that define the minimum bounding rectangle in which the data source resides. |
|
Evaluation Scale |
|
The scale value range and increment value applied to inputs in a weighted overlay operation. |
|
Extent |
|
The coordinate pairs that define the minimum bounding rectangle (x-minimum, y-minimum and x-maximum, y-maximum) of a data source. All coordinates for the data source are within this boundary. |
|
Extract Values |
|
An extract values parameter. |
|
Feature Class |
|
A collection of spatial data with the same shape type: point, multipoint, polyline, and polygon. |
|
Feature Dataset |
|
A collection of feature classes that share a common geographic area and the same spatial reference system. |
|
Feature Layer |
|
A reference to a feature class, including symbology and rendering properties. |
|
Feature Set |
|
Interactive features that draw the features when the tool is run. |
|
Field |
|
A column in a table that stores the values for a single attribute. |
|
Field Info |
|
The details about a field in a field map. |
|
Field Mappings |
|
A collection of fields in one or more input tables. |
|
File |
|
A file on disk. |
|
Folder |
|
A location on disk where data is stored. |
|
Formulated Raster |
|
A raster surface whose cell values are represented by a formula or constant. |
|
Fuzzy function |
|
The algorithm used in fuzzification of an input raster. |
|
Geodataset |
|
A collection of data with a common theme in a geodatabase. |
|
GeoDataServer |
|
A coarse-grained object that references a geodatabase. |
|
Geometric Network |
|
A linear network represented by topologically connected edge and junction features. Feature connectivity is based on their geometric coincidence. |
|
Geostatistical Layer |
|
A reference to a geostatistical data source, including symbology and rendering properties. |
|
Geostatistical Search Neighborhood |
|
The searching neighborhood parameters for a geostatistical layer are defined. |
|
Geostatistical Value Table |
|
A collection of data sources and fields that define a geostatistical layer. |
|
GlobeServer |
|
A Globe server. |
|
GPServer |
|
A geoprocessing server. |
|
Graph |
|
A graph. |
|
Graph Data Table |
|
A graph data table. |
|
Group Layer |
|
A collection of layers that appear and act as a single layer. Group layers make it easier to organize a map, assign advanced drawing order options, and share layers for use in other maps. |
|
Horizontal Factor |
|
The relationship between the horizontal cost factor and the horizontal relative moving angle. |
|
Image Service |
|
An image service. |
|
Index |
|
A data structure used to speed the search for records in geographic datasets and databases. |
|
INFO Expression |
|
A syntax for defining and manipulating data in an INFO table. |
|
INFO Item |
|
An item in an INFO table. |
|
INFO Table |
|
A table in an INFO database. |
|
Internet Tiled Layer |
|
An internet tiled layer. |
|
KML Layer |
|
A KML layer. |
|
Knowledge Graph Layer |
|
A layer that visualizes entities and relationships from a knowledge graph. |
|
LAS Dataset |
|
A LAS dataset stores reference to one or more LAS files on disk as well as to additional surface features. A LAS file is a binary file that stores airborne lidar data. |
|
LAS Dataset Layer |
|
A layer that references a LAS dataset on disk. This layer can apply filters on lidar files and surface constraints referenced by a LAS dataset. |
|
Layer |
|
A reference to a data source, such as a shapefile, coverage, geodatabase feature class, or raster, including symbology and rendering properties. |
|
Layer File |
|
A layer file stores a layer definition, including symbology and rendering properties. |
|
Layout |
|
A layout in an ArcGIS Pro project or a layout file ( |
|
Line |
|
A shape, straight or curved, defined by a connected series of unique x,y-coordinate pairs. |
|
Linear Unit |
|
A linear unit type and value such as meter or feet. |
|
Long |
|
An integer number value. |
|
M Domain |
|
A range of lowest and highest possible value for m-coordinates. |
|
Map |
|
An ArcGIS Pro map. |
|
MapServer |
|
A map server. |
|
Map Server Layer |
|
A map server layer. |
|
Mosaic Dataset |
|
A collection of raster and image data that allows you to store, view, and query the data. It is a data model in the geodatabase used to manage a collection of raster datasets (images) stored as a catalog and viewed as a mosaicked image. |
|
Mosaic Layer |
|
A layer that references a mosaic dataset. |
|
Neighborhood |
|
The shape of the area around each cell used to calculate statistics. |
|
Network Analyst Class FieldMap |
|
The mapping between location properties in a Network Analyst layer (such as stops, facilities, and incidents) and a point feature class. |
|
Network Analyst Hierarchy Settings |
|
A hierarchy attribute that divides hierarchy values of a network dataset into three groups using two integers. The first integer sets the ending value of the first group; the second integer sets the beginning value of the third group. |
|
Network Analyst Layer |
|
A group layer used to express and solve network routing problems. Each sublayer held in memory in a Network Analyst layer represents some aspect of the routing problem and the routing solution. |
|
Network Data Source |
|
A network data source can be a local dataset specified using its catalog path or a layer from a map, or it can be a URL to a portal. |
|
Network Dataset |
|
A collection of topologically connected network elements (edges, junctions, and turns), derived from network sources and associated with a collection of network attributes. |
|
Network Dataset Layer |
|
A reference to a network dataset, including symbology and rendering properties. |
|
Network Travel Mode |
|
A dictionary of travel mode objects. |
|
Oriented Imagery Layer |
|
A collection of camera locations with image metadata. |
|
Pairwise Weights Table |
|
A table of a pairwise comparison matrix containing evaluations for each of the pairs for the input variables. |
|
Parcel Fabric For ArcMap |
|
A dataset used for the storage, maintenance, and editing of a continuous surface of connected parcels or parcel network. |
|
Parcel Fabric Layer |
|
A layer referencing a parcel fabric on disk. This layer works as a group layer, organizing a set of related layers under a single layer. |
|
Point |
|
A pair of x,y-coordinates. |
|
Polygon |
|
A connected sequence of x,y-coordinate pairs in which the first and last coordinate pair are the same. |
|
Projection File |
|
A file storing coordinate system information for spatial data. |
|
Pyramid |
|
Specifies whether pyramids are built. |
|
Radius |
|
The surrounding points that are used for interpolation. |
|
Random Number Generator |
|
The seed and the generator to use when creating random values. |
|
Raster Band |
|
A layer in a raster dataset. |
|
Raster Calculator Expression |
|
A raster calculator expression. |
|
Raster Catalog |
|
Legacy:Raster catalogs are a legacy format and are not supported in ArcGIS Pro. |
|
Raster Catalog Layer |
|
Legacy:Raster catalog layers are a legacy format and are not supported in ArcGIS Pro. |
|
Raster Data Layer |
|
A raster data layer. |
|
Raster Dataset |
|
A single dataset built from one or more rasters. |
|
Raster Layer |
|
A reference to a raster, including symbology and rendering properties. |
|
Raster Statistics |
|
Specifies whether raster statistics will be built. |
|
Raster Type |
|
Raster data is added to a mosaic dataset by specifying a raster type. The raster type identifies metadata, such as georeferencing, acquisition date, and sensor type, with a raster format. |
|
Record Set |
|
An interactive table. Provide the table values when the tool is run. |
|
Relationship Class |
|
The details about the relationship between objects in the geodatabase. |
|
Remap |
|
A table that defines how raster cell values are reclassified. |
|
Route Measure Event Properties |
|
The fields on a table that describe events measured by a linear reference route system. |
|
Scene Service Layer |
|
A scene service layer. |
|
Schematic Dataset |
|
A collection of schematic diagram templates and schematic feature classes that share the same application domain, for example, water or electrical. |
|
Schematic Diagram |
|
A schematic diagram. |
|
Schematic Diagram Class |
|
A schematic diagram class. |
|
Schematic Folder |
|
A schematic folder. |
|
Schematic Layer |
|
A composite layer composed of feature layers based on the schematic feature classes associated with the template on which the schematic diagram is based. |
|
SemiVariogram |
|
The distance and direction representing two locations used to quantify autocorrelation. |
|
ServerConnection |
|
A server connection. |
|
Shapefile |
|
Spatial data in shapefile format. |
|
Spatial Reference |
|
The coordinate system used to store a spatial dataset, including the spatial domain. |
|
SQL Expression |
|
A syntax for defining and manipulating data from a relational database. |
|
String |
|
A text value. |
|
String Hidden |
|
A string that is masked by asterisk characters. Note:The text is not encrypted when used in scripting. |
|
Table |
|
Tabular data. |
|
Table View |
|
A representation of tabular data for viewing and editing purposes stored in memory or on disk. |
|
Terrain Layer |
|
A reference to a terrain, including symbology and rendering properties. It’s used to draw a terrain. |
|
Text File |
|
A text file. |
|
Tile Size |
|
The width and height of data stored in block. |
|
Time configuration |
|
The time periods used for calculating solar radiation at specific locations. |
|
Time Unit |
|
A time unit type and value such as minutes or hours. |
|
TIN |
|
A vector data structure that partitions geographic space into contiguous, nonoverlapping triangles. The vertices of each triangle are sample data points with x-, y-, and z-values. |
|
Tin Layer |
|
A reference to a TIN, including topological relationships, symbology, and rendering properties. |
|
Tool |
|
A geoprocessing tool. |
|
Toolbox |
|
A geoprocessing toolbox. |
|
Topo Features |
|
Features that are input to the interpolation. |
|
Topology |
|
A topology that defines and enforces data integrity rules for spatial data. |
|
Topology Layer |
|
A reference to a topology, including symbology and rendering properties. |
|
Trajectory Layer |
|
A layer that references a trajectory dataset. |
|
Transformation Function |
|
A Spatial Analyst transformation function. |
|
Utility Network |
|
A utility network. |
|
Utility Network Layer |
|
A utility network layer. |
|
|
A collection of columns of values. |
|
|
Variant |
|
A data value that can contain any basic type: Boolean, date, double, long, and string. |
|
Vector Tile Layer |
|
A vector tile layer. |
|
Vertical Factor |
|
The relationship between the vertical cost factor and the vertical, relative moving angle. |
|
VPF Coverage |
|
Spatial data stored in Vector Product Format. |
|
VPF Table |
|
Attribute data stored in Vector Product Format. |
|
WCS Coverage |
|
Web Coverage Service (WCS) is an open specification for sharing raster datasets on the web. |
|
Weighted Overlay Table |
|
A table with data to combine multiple rasters by applying a common measurement scale of values to each raster, weighing each according to its importance. |
|
Weighted Sum |
|
Data for overlaying several rasters, each multiplied by their given weight and summed. |
|
WMS Map |
|
A Web Map Service (WMS) specification map. |
|
Workspace |
|
A container such as a geodatabase or folder. |
|
XY Domain |
|
A range of lowest and highest possible values for x,y-coordinates. |
|
Z Domain |
|
A range of lowest and highest possible values for z-coordinates. |