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.
Note:
This tool is now available in Map Viewer, the modern map-making tool in ArcGIS Enterprise. To learn more, see Zonal Statistics as Table (Map Viewer).
To run this tool, the portal must be configured for raster analysis.
If you do not see this tool in Map Viewer Classic, contact your organization administrator. Your portal may not be configured for raster analysis, or you may not have the privileges required to run the tool.
Workflow diagram
Examples
Some example application of this tool includes the following:
- Given a layer of watershed boundaries and a layer of land-use boundaries by land-use type, calculate 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.
Usage notes
If the zone is a feature, it will be converted to a raster internally using the cell size and cell alignment from the value raster.
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 during tool execution.
When the cell size of the zone and the value raster is different, the output cell size will be the Maximum Of Inputs value, 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. Either of these cases will trigger an internal resampling before the zonal operation is performed.
If the zone does not overlap with the cell center of the value raster, the zone will become NoData. In this case, determine an appropriate raster resolution that will represent the detail of your raster or feature zone input, and use this resolution as the cell size of the raster analysis settings of the environment.
If the zone is a point feature, it is possible to 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).
If Use current map extent is checked, only those features in the input layer and the layer to be summarized that are visible within the current map extent will be analyzed. If unchecked, all features in both the input layer and the layer to be summarized will be analyzed, even if they are outside the current map extent.
The parameters for this tool are listed in the following table:
Parameter | Explanation |
---|---|
Choose zone raster or features | The input that defines the boundaries of the zones, or areas, that will be summarized. The input can be an integer raster or feature data. For rasters, the zones are defined by all locations in the input that have the same cell value. For features, the zones can be overlapping. The areas do not have to be contiguous. |
Zone field | The field that contains the values that define each zone. It can be an integer or a string field of the zone dataset. |
Choose value raster | The raster that contains the values on which to calculate a statistic. It can be either integer or floating point. However, when it is floating-point type, the options for calculating majority, minority, and variety will not be available. |
Ignore NoData in calculations (optional) | Specifies whether NoData values are ignored in the analysis.
|
Statistics type (optional) | Specifies the statistic type to be calculated. The input can be one of the following: All, Mean, Majority, Maximum, 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. |
Percentile values (optional) | The percentile to calculate. The default is 90, indicating the 90th percentile. The value 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 maximum. A value of 50 will produce essentially the same result as the median statistic. This parameter is only supported if the Statistics type parameter is set to Percentile or All. |
Percentile interpolation type (optional) | Specifies the method of percentile interpolation to be used when the number of values from the input raster to be calculated is even.
This parameter is only supported if the Statistics type parameter is set to Percentile or All. |
Process as multidimensional (optional) | Specifies how the input multidimensional image services will be processed if they are multidimensional.
|
Result table name | The name of the layer that will be created in My Content and added to the map. The default name is based on the tool name and the input layer name. If the layer already exists, you will be prompted to provide another name. You can specify the name of a folder in My Content where the result will be saved using the Save result in drop-down box. |
Environments
Analysis environment settings are additional parameters that affect a tool's results. You can access the tool's analysis environment settings by clicking the gear icon at the top of the tool pane.
This tool honors the following Analysis Environments:
- Output coordinate system—Specifies the coordinate system of the output layer.
- Extent—Specifies the area to be used for analysis.
- Snap Raster—Adjusts the extent of the output so it matches the cell alignment of the specified snap raster layer.
- Cell size—The cell size to use in the output layer.
- Mask—Specifies a mask layer, where only the cells that fall within the mask area will be used for analysis.
- Parallel processing factor—Controls the raster processing CPU or GPU instances.
Similar tools and raster functions
Use the Zonal Statistics as Table tool to summarizes rasters within boundaries and report the results as a table. Other tools may be useful in solving similar problems.
Map Viewer Classic analysis tools and raster functions
Use the Summarize Raster Within tool or the Zonal Statistics raster function to summarize rasters within boundaries and create an image service output.
ArcGIS Pro analysis tools and raster functions
The Zonal Statistics and Zonal Statistics as Table geoprocessing tools are available in the Image Analyst and Spatial Analyst toolboxes.
The Summarize Raster Within and Zonal Statistics As Table tools are available in the Raster Analysis toolbox.
Zonal Statistics is also available as a raster function.
ArcGIS Enterprise developers resources
If you are working in ArcGIS REST API, use the Summarize Raster Within or Zonal Statistics As Table tasks.
If you are working in ArcGIS API for Python, use summarize_raster_within or zonal_statistics_as_table from the arcgis.raster.analytics module, or use zonal_statistics from the arcgis.raster.functions.gbl module.