Available with ArcGIS Image for ArcGIS Online.
The Zonal Statistics as Table tool summarizes the values of a raster within the zones of another dataset and reports the results as a table.
The output is a hosted feature layer.
Example scenarios for using this tool include the following:
- Given a layer of watershed boundaries and a layer of land-use boundaries by land-use type, calculate the total acreage of land-use type for each watershed.
- Given a layer of parcels in a county and a layer of city boundaries, summarize the average value of vacant parcels within each city boundary.
Zonal Statistics as Table includes configurations for input layers, statistical analysis settings, and the result layer.
The Input layers group includes the following parameters:
Input zone raster or features specifies the input that defines the boundaries of the zones, or areas, that will be summarized. A zone is defined as all areas in the input that have the same value. The areas do not have to be contiguous. Both raster and feature data can be used for the zone input.
If the zone input is a raster, it must be an integer raster. The zones are defined by all locations in the input that have the same cell value.
If the zone input is a feature, it will be converted to a raster internally using the cell size and cell alignment from Input value raster.
If the zone input is a point feature, it may have more than one point contained within any particular cell of the value input raster. For such cells, the zone value is determined by the point with the lowest ObjectID field (for example, OID or FID).
Zone field specifies the field that contains the values that define each zone.
It can be an integer or a string field of the zone layer.
When specifying the zone input, the default zone field will be the first available integer or text field. If no other valid fields exist, the ObjectID field (for example, OID or FID) will be the default.
Input value raster specifies the raster that contains the values on which a statistic will be calculated.
It can be either integer or floating point. However, when it is floating-point type, the options for calculating the majority, minority, and variety statistics will not be available.
Interactions between the Input layers group parameters are listed below.
When the zone and value inputs are both rasters of the same cell size and the cells are aligned, they will be used directly in the tool and will not be resampled internally.
When the cell size of the zone raster and the value raster is different, the output cell size will be the maximum of the input, and the value raster will be used as the snap raster internally.
If the cell size is the same but the cells are not aligned, the value raster will be used as the snap raster internally.
Both of these cases will trigger an internal resampling before the zonal operation is performed.
If a particular zone does not overlap any cell centers of the value raster, those zones will not be converted to the internal zone raster. As a result, those zones will not be represented and will become NoData in the output.
You can manage this by first determining an appropriate raster resolution that will retain the detail of the zone input; then use this resolution as the cell size in the environment.
Specifying a smaller cell size in the Cell size environment setting will generate a larger output raster. The higher resolution output will not necessarily be as high quality a result, since the additional detail does not exist.
The Processing extent environment setting will affect how the input layers are analyzed. In the Environment settings, if Processing extent is set to Use current map extent, only the elements in the Input zone raster or features layer and the Input value raster layer that are visible within the current map extent will be analyzed.
If the Processing extent environment is set to the Default option, all of the elements in both the zone layer and the value layer will be analyzed, even if they are outside the current map extent.
Statistical analysis settings
The Statistical analysis settings group includes the following parameters:
Statistic type specifies the statistic type to be calculated. The statistic will be calculated for all cells in the value raster that belong to the same zone as the output cell.
The statistics type can be All, Majority, Maximum, Mean, Median, Minimum, Minority, Percentile, Range, Standard deviation, Sum, Variety, Minimum and Maximum, Mean and Standard deviation, or Minimum, Maximum and Mean. The default is All.
The available statistic type depends on the data type of the Input value raster value, and the statistic calculation type specified by the Calculate circular statistics parameter.
If the data type is integer, arithmetic statistics calculation supports the Mean, Majority, Maximum, Median, Minimum, Minority, Percentile, Range, Standard deviation, Sum, and Variety options. Circular statistics calculation supports the Mean, Majority, Minority, Standard deviation, and Variety options.
If the data type is float, arithmetic statistics calculation supports the Mean, Maximum, Median, Minimum, Percentile, Range, Standard deviation, and Sum options. Circular statistics calculation supports the Mean and Standard deviation options.
If the Input value raster parameter value is floating-point type, the calculations for Majority, Minority, and Variety cannot be computed.
For majority and minority calculations, when there is a tie, the output will be the lowest of the tied values.
Percentile values specifies the percentiles to calculate. The default is 90, indicating the 90th percentile.
The values can range from 0 to 100. The result of specifying the 0th percentile is essentially equivalent to that of the minimum statistic, and the 100th percentile is equivalent to the maximum statistic. A value of 50 will produce essentially the same result as the median statistic.
This parameter is only available if the Statistic type parameter is set to All or Percentile.
Percentile interpolation type specifies the method of interpolation that will be used when the percentile value falls between two cell values from the input value raster. This can occur when the number of values from the input raster to be calculated is even.
The setting for this input can be Auto-detect, Nearest, or Linear. The default is Auto-detect.
For Auto-detect, if the input value raster is of integer pixel type, the Nearest method will be used. If the input value raster is of floating-point pixel type, the Linear method will be used.
For Nearest, the nearest available value to the specified percentile is used. In this case, the output pixel type is the same as that of the input value raster.
For Linear, the weighted average of the two surrounding values from the specified percentile is used. In this case, the output pixel type is floating point.
This parameter is only available if the Statistic type parameter is set to All, Median, or Percentile.
Calculate circular statistics specifies how the statistics type will be calculated for circular data.
If unchecked, ordinary arithmetic (linear) statistics will be calculated. This is the default.
If checked, circular statistics will be calculated. Specify an appropriate value for the Circular wrap value parameter.
For circular statistics, the available statistics options depend on the data type of the Input value raster parameter value. If it is integer, the Mean, Majority, Minority, Standard deviation, and Variety options are available. If it is floating point, the Mean and Standard deviation options are available.
Circular statistics are appropriate for cyclic quantities such as compass direction in degrees, daytimes, and fractional parts of real numbers.
Circular wrap value specifies the value that will be used to round a linear value to the range of a given circular statistic. It is a positive number. The wrap value is the highest possible value (upper bound) in the cyclic data. This value also represents the same quantity as the lowest possible value (lower bound). The default value is 360.
This parameter is only available when circular statistics are calculated.
Ignore NoData specifies whether NoData cells in the input value raster will be ignored in the results of the zones they fall within.
If checked, within any particular zone, only cells that have a value in the value input will be used in determining the output value for that zone. NoData cells in the value raster will be ignored in the statistic calculation. This is the default.
If unchecked, within any particular zone, if NoData cells exist in the value raster, they will not be ignored, and their existence indicates that there is insufficient information to perform statistical calculations for all the cells in the zone. Consequently, the entire zone will receive the NoData value on the output raster.
Process as multidimensional specifies how the input rasters will be processed if they are multidimensional.
If checked, statistics will be calculated from the current slice of the input multidimensional dataset.
If unchecked, the statistics will be calculated for all dimensions of the input multidimensional dataset. This is the default.
The Result layer group includes the following parameters:
Output table name is the name of the output layer that will be created and added to the map.
The name must be unique. If a layer with the same name already exists in your organization, the tool will fail and you will be prompted to use a different name.
- Save in folder specifies the name of a folder in My Content where the result will be saved.
Analysis environment settings are additional parameters that affect a tool's results. You can access the tool's analysis environment settings from the Environment settings parameter group.
This tool honors the following analysis environments:
This tool consumes credits.
Use Estimate credits to calculate the number of credits that will be required to run the tool. For more information, see Understand credits for spatial analysis.
This tool includes the following outputs:
One output table layer showing the result of the zonal operation
This tool requires the following licensing and configurations:
- Creator or GIS Professional user type
- Publisher, Facilitator, or Administrator role, or an equivalent custom role
- ArcGIS Image for ArcGIS Online
Use the following resources to learn more:
- How the zonal statistics tools work in ArcGIS Pro
- Zonal Statistics as Table in ArcGIS REST API
- zonal_statistics_as_table in ArcGIS API for Python
- Zonal Statistics in ArcGIS Online
- Zonal Statistics As Table in ArcGIS Pro with the Raster Analysis extension
- Zonal Statistics as Table in ArcGIS Pro with the Spatial Analyst extension