- URL:
- https://<geoanalytics-url>/SummarizeWithin
- Methods:
GET
- Version Introduced:
- 10.5
Description
The Summarize
operation find features (and portions of features) that are within the boundaries of areas in the first input layer. The following are examples:
- Given a layer of watershed boundaries and a layer of land-use boundaries, you can 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, you can summarize the average of vacant parcels within each city boundary.
- Given a layer of counties and a layer of roads, you can summarize the total mileage of roads by road type within each county.
You can think of the Summarize
operation as taking two layers and stacking them on top of each other. One of the layers, the summary
value, must be a polygon layer, and imagine that these polygon boundaries are colored red. The other layer, the summarized
value, can be any feature type—point, line, or polygon. After stacking these layers on top of each other, you look down through the stack and count the number of features in summarized
that fall within the polygons with the red boundaries (summary
). Not only can you count the number of features, you can calculate statistics about the attributes of the features in summarize
, such as sum, mean, minimum, maximum, and so on.
Request parameters
Parameter | Details |
---|---|
| The polygon features. Features, or portions of features, in the Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
| The type of bin that will be generated and the Values: REST examples
|
| The distance for the REST examples
|
| The linear distance unit for the bins that the Values: REST examples
|
| Point, line, or polygon features that will be summarized for each polygon in the Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
|
A list of field names and statistical summary types you want to calculate. Note that the count is always returned. By default, all statistics are returned.
REST examples
|
| A list of field names and the statistical summary types that will be calculated for all features in
REST examples
|
| A list of numeric fields that represent rate- or index-type quantities. Fields included in this list will not be proportioned prior to calculating REST examples
|
| A Boolean value that instructs the task to calculate statistics based on the shape type of the Values: |
| The units used for the If If REST examples
|
| This is a field of the REST examples
|
| This Boolean parameter is applicable only when a Values: |
| This Boolean parameter is applicable only when a Values: |
|
The task will create a feature service of the results. You define the name of the service. REST examples
|
|
The
Syntax:
|
|
The response format. The default response format is Values: |
Example usage
The following is a sample request URL for Summarize
:
https://webadaptor.domain.com/server/rest/services/System/GeoAnalyticsTools/GPServer/SummarizeWithin/submitJob?summaryPolygons={"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0" "filter":"Month = 'September'"}&binType=Hexagon&binSize=108.3&binSizeUnit=Meters&summarizeLayer={"url":"https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/1" "filter":"City = 'Corpus Christi'"}&sumShape=true&shapeUnits=SquareMeters&outputName=myOutput&f=json
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 job
to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use job
to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/SummarizeWithin/jobs/<jobId>
Access 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:
https://<analysis-url>/SummarizeWithin/jobs/<jobId>/results/<response type>?token=<your token>&f=json
Response | Description |
---|---|
| The polygon features of
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 is accessed. |
| If a
The result has properties for parameter name, data type, and value. The contents of
|