The Summarize Within task finds the point, line, or polygon features (or portions of these features) that are within the boundaries of polygons in another layer.
For example:
- 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.
- Given a layer of counties and a layer of roads, summarize the total mileage of roads by road type within each county.
You can think of Summarize Within as taking two layers and stacking them on top of each other. One of the layers, the sum
, must be a polygon layer, and imagine that these polygon boundaries are all colored red. The other layer, the summary
, can be any feature type—point, line, or polygon. After stacking these layers on top of each other, you peer down through the stack and count the number of features in the summary
that fall within the polygons with the red boundaries (the sum
). Not only can you count the number of features, you can also calculate simple statistics about the attributes of the features in the summary
, such as sum, mean, minimum, maximum, and so on.
Request URL
http://<analysis url>/SummarizeWithin/submitJob
Request parameters
Parameter | Description |
---|---|
| The polygon features. Features, or portions of features, in the Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
Examples:
|
| Point, line, or polygon features that will be summarized for each polygon in the Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
Examples:
|
| A boolean value that instructs the task to calculate statistics based on shape type of the Values: If |
| Values:
Example:
|
(Required if | A list of field names and statistical summary types that you want to calculate for all features in the Syntax:
Example:
|
| This is a field of the Example:
When a |
| This Boolean parameter is applicable only when a The default is Values: |
| This Boolean parameter is applicable only when a Values: |
|
If provided, the task will create a feature service of the results. You define the name of the service. If an Syntax:
In ArcGIS Online or ArcGIS Enterprise 10.9.1 and later, you can overwrite an existing feature service by providing the Syntax:
or
|
|
The Context parameter contains the following additional settings that affect task operation:
Syntax:
|
| The type of bin that will be generated. These bins will summarize the features, or portions of features, in the
Example: When generating bins, for Either |
(Required if | The distance for the bins of type Example: |
(Required if | The linear distance unit for the bins that Values: The default is Example: |
| The response format. The default response format is Values: |
Response
When you submit a request, the service assigns a unique job ID for the transaction. Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use the job
to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, you use the job
to retrieve the results. To track the status, you can make a request of the following form:
http://<analysis url>/SummarizeWithin/jobs/<jobId>
Accessing results
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
http://<analysis url>/SummarizeWithin/jobs/<jobId>/results/<output parameter name>?token=<your token>&f=json
Parameter | Description |
---|---|
| These are the polygon features of the Example:
The result has properties for parameter name, data type, and value. The contents of
See Feature Output for more information about how the result layer or collection is accessed. |
| If a Example:
The result has properties for parameter name, data type, and value. The contents of
|