- URL:https://<geoanalytics-url>/SummarizeAttributes
- Version Introduced:10.5
Description
The SummarizeAttributes operation takes an input layer and summarizes and calculates statistics for like values. The most basic statistic is the count of features with a specified value, but other statistics can be calculated as well. You can also summarize values into time steps.
For example, if you have a point layer of store locations with a field representing the DISTRICT_MANAGER_NAME and you want to summarize coffee sales by manager, you can specify the DISTRICT_MANAGER_NAME field as the field to dissolve on, and all rows of data representing individual managers will be summarized. This means all store locations managed by Manager1 will be summarized into one row with summary statistics calculated. In this instance, statistics such as the number of stores and the sum of TOTAL_SALES for all stores that Manager1 manages will be calculated as well as for any other manager listed in the DISTRICT_MANAGER_NAME field.
Request parameters
Parameter | Details |
---|---|
inputLayer (Required) | The features that will be summarized. Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
fields (Required) | The fields that will be used to summarize like features. For example, if you choose a field named property type with the values of commercial and residential, all the features with property type residential will be summarized together through calculated summary statistics and all of the commercial features will be summarized together the same way. Nota:[] will group all features into one summary feature. REST examples
|
timeStepInterval (Optional) | A numeric value that specifies duration of the time step interval. The default is none. This option is only available if the input points are time enabled and represent an instant in time. This parameter is available at ArcGIS Enterprise 10.9. REST example
|
timeStepIntervalUnit (Optional) | A string that specifies units of the time step interval. The default is none. This option is only available if the input points are time enabled and represent an instant in time. This parameter is available at ArcGIS Enterprise 10.9. REST examples
|
timeStepRepeatInterval (Optional) | A numeric value that specifies how often the time step repeat occurs. The default is none. This option is only available if the input points are time enabled and of time type instant. This parameter is available at ArcGIS Enterprise 10.9. REST examples
|
timeStepRepeatIntervalUnit (Optional) | A string that specifies the temporal unit of the step repeat. The default is none. This option is only available if the input points are time enabled and of time type instant. This parameter is available at ArcGIS Enterprise 10.9. REST Examples
|
timeStepReference (Optional) | A date that specifies the reference time to align the time slices to, represented in milliseconds from epoch. The default is January 1, 1970, at 12:00 a.m. (epoch time stamp 0). This option is only available if the input points are time enabled and of time type instant. This parameter is available at ArcGIS Enterprise 10.9. REST examples
|
summaryFields (Optional) | 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. The Count of features with the same fields values are always returned. onStatisticField specifies the name of the fields in the target layer. statisticType is one of the following for numeric fields:
REST examples
|
outputName (Required) | The task will create a feature service of the results. You define the name of the service. REST examples
|
context (Optional) | The context parameter contains additional settings that affect task execution. For this task, there are two possible settings:
|
f | The response format. The default response format is html. Values: html | json |
Example usage
The following is a sample request URL for SummarizeAttributes:
https://webadaptor.domain.com/server/rest/services/System/GeoAnalyticsTools/GPServer/SummarizeAttributes/submitJob?inputLayer={"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter":"Month = 'September'"}&fields=county&outputName=myOutput&f=json
Response
When you submit a request, the service assigns a unique job ID for the transaction.
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use jobId to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/SummarizeAttributes/jobs/<jobId>
Access results
When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:
https://<analysis-url>/SummarizeAttributes/jobs/<jobId>/results/output?token=<your token>&f=json
Response | Description |
---|---|
output |
The output will always contain a table.
The result has properties for parameter name, data type, and value. The contents of value depend on the outputName parameter provided in the initial request. The value contains the URL of the feature service layer. See Feature output for more information about how the result layer is accessed. |