The Summarize Raster Within tool summarizes the values of a raster within the zones of another dataset
To run this tool, the portal must be configured for raster analysis.
This functionality is currently only supported in Map Viewer Classic (formerly known as Map Viewer). It will be available in a future release of the new Map Viewer. 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.
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.
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:
Choose area layer to summarize a raster layer within defined boundaries
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.
Choose field to define the boundaries
The field that contains the values that define each zone.
It can be an integer or a string field of the zone dataset.
Choose raster layer to summarize
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.
Choose statistic to calculate (optional)
Specifies the statistic type to be calculated.
The input can be one of the following: Average, Majority, Maximum, Median, Minimum, Minority, Percentile, Range, Standard deviation, Sum, or Variety. The default is Average.
Percentile value (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 Choose statistic to calculate parameter is set to Percentile.
Ignore missing values in calculation (optional)
Specifies whether missing values are ignored in the analysis.
Process as multidimensional (optional)
Specifies how the input multidimensional image services will be processed if they are multidimensional.
Result layer 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.
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.
Similar tools and raster functions
Use the Summarize Raster Within tool to summarize rasters within boundaries. Other tools may be useful in solving similar problems.
Map Viewer Classic analysis tools and raster functions
Use the Zonal Statistics As Table tool to summarize rasters within boundaries and report results as a table. The Zonal Statistics raster function performs a similar analysis.
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.