Summarize within
What is a summarize within analysis?
A summarize within analysis is the process of finding areas (and portions of areas) that overlap between two feature datasets and calculating statistics for the features that overlap. To execute the analysis, use the spatial analysis service and the Summarize
operation.
Real-world examples of this analysis include the following:
- Calculating the total acreage of land-use type features within each polygon of a watershed feature layer.
- Summarizing the average value of vacant parcels with each city boundary polygon.
- Calculating the total mileage of roads by road type within each county polygon.
How summarize within works
The general steps to performing a summarize within analysis are as follows:
- Review the parameters for the
Summarize
operation.Within - Send a request to get the spatial analysis service URL.
- Execute a job request with the following URL and parameters:
- URL:
https:
//< YOUR_ ANALYSIS_ SERVICE>/arcgis/rest/services/tasks/GPServer/Summarize Within/submit Job - Parameters:
sum
: The polygon features. Features, or portions of features, in theWithin Layer summary
that fall within the boundaries of these polygons will be summarized.Layer summary
: The polygon features into which the input points will be aggregated.Layer output
: A string representing the name of the hosted feature layer to reutrn with the results.Name
- URL:
- Check the status.
- Get the output layer results.
To see examples using ArcGIS API for Python, ArcGIS REST JS, and the ArcGIS REST API, go to Examples below.
URL Request
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson |
token | An OAuth 2.0 access token. Learn how to get an access token in Security and authentication. | token=< |
sum | The polygon features. Features, or portions of features, in the summary that fall within the boundaries of these polygons will be summarized. | {"url": < {"layer |
summary | Point, line, or polygon features that will be summarized for each polygon in the sum . | {"url": < {"layer |
Key parameters
Name | Description | Examples |
---|---|---|
sum | A Boolean value that instructs the task to calculate statistics based on shape type of the summary , such as the count of points, the total length of lines, or the total area of polygons of the summary within each polygon in the sum . If the summary is lines or polygons, the count of features within each summary polygon is returned. | true | false |
shape | When summary contains polygons: Acres | Hectares | SquareMeters | SquareKilometers | SquareMiles | SquareYards | SquareFeet When summary contains lines: Meters | Kilometers | Feet | Yards | Miles | "shape |
output | A string representing the name of the hosted feature layer to return with the results. NOTE: If you do not include this parameter, the results are returned as a feature collection (JSON). | {"service |
Example
Calculate the length of bike routes
In this example, the length (in miles) of bike routes is calculated within district polygons. the summary
value is the Bike routes hosted feature layer. The sum
value is the Maintenance Assessment District hosted layer containing of polygon features.
The sum
parameter calculates the count of the line features and the group
parameter provides the summarized length of the bike routes within each district.
APIs
Service requests
Tutorials
Learn how to perform related analyses interactively with Map Viewer and programmatically with ArcGIS API for Python, ArcGIS REST JS, and ArcGIS REST API.
Services
Spatial analysis service
Process spatial datasets to discover relationships and patterns.
API support
Aggregate points | Summarize center and dispersion | Summarize nearby | Summarize within | |
---|---|---|---|---|
ArcGIS Maps SDK for JavaScript | 1 | 1 | 1 | 1 |
ArcGIS Maps SDK for .NET | ||||
ArcGIS Maps SDK for Kotlin | ||||
ArcGIS Maps SDK for Swift | ||||
ArcGIS Maps SDK for Java | ||||
ArcGIS Maps SDK for Qt | ||||
ArcGIS API for Python | ||||
ArcGIS REST JS | 1 | 1 | 1 | 1 |
Esri Leaflet | 2 | 2 | 2 | 2 |
MapBox GL JS | 2 | 2 | 2 | 2 |
OpenLayers | 2 | 2 | 2 | 2 |
- 1. Access with geoprocessing task
- 2. Access via ArcGIS REST JS
Tools
Developer dashboard
Manage API keys, service usage, and data with the ArcGIS Developers website.
ArcGIS Online
Create, manage, and share content and data with cloud-based GIS tools.
Map Viewer
Create, explore, and share web maps for 2D applications.
ArcGIS Pro
Explore, visualize, and analyze both 2D and 3D data with desktop GIS tools.