ArcGIS REST API

Summarize Center and Dispersion

Summarize Center and Dispersion

The Summarize Center and Dispersion task finds central features and directional distributions. It can be used to answer questions such as:

  • Where is the center?
  • Which feature is the most accessible from all other features?
  • How dispersed, compact, or integrated are the features?
  • Are there directional trends?

Request URL

http://<analysis url>/SummarizeCenterAndDispersion/submitJob

Request Parameters

ParameterDescription

analysisLayer

(Required)

The point, line, or polygon features to be analyzed.

Syntax: As described in detail in the Feature Input topic, this parameter can be

  • a URL to a feature service layer with an optional filter to select specific features, or
  • a feature collection.

Examples:

  • {"url": <feature service layer url>, "filter": <where clause>}
  • {"layerDefinition": {}, "featureSet": {}, "filter": <where clause>}

summarizeType

The method with which to summarize the analysisLayer.

Values: CentralFeature | MeanCenter | MedianCenter | Ellipse

Example: " summarizeType": "CentralFeature"

ellipseSize

The size of the output ellipse in standard deviations. The default ellipse size is 1. Valid choices are 1, 2, or 3 standard deviations.

Examples:

  • "ellipseSize": "1"
  • "ellipseSize": [1, 2, 3]

weightField

A numeric field in the analysisLayer to be used to weight locations according to their relative importance.

Example: "weightField": "NumEmployees"

groupField

The field used to group features for separate directional distribution calculations. The groupFieldcan be of integer, date, or string type.

Example: "groupField": "Country"

OutputName

If provided, the task will create a feature service of the results. You define the name of the service. If outputName is not supplied, the task will return a feature collection.

Syntax:
{
  "serviceProperties": {
    "name": "<service name>"
  }
}

Context

Context contains additional settings that affect task execution. For Summarize Center and Dispersion, there are two settings.

  1. Extent (extent)—a bounding box that defines the analysis area. Only those features in the input layer that intersect the bounding box will be buffered.
  2. Output Spatial Reference (outSR)—the output features will be projected into the output spatial reference.

Syntax:

{
"extent" : {extent}
"outSR" : {spatial reference}
}

f

The response format. The default response format is html.

Values: html | json | kmz

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 jobId to periodically check the status of the job and messages as described in the topic Checking job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:

http://<analysis url>/SummarizeCenterAndDispersion/jobs/<jobId>

Accessing results

When the status of the job request is esriJobSucceded, you can access the results of the analysis by making a request of the following form.

http://<analysis url>/SummarizeCenterAndDispersion/jobs/<jobId>/results/centralFeatureResultLayer?token=<your token>&f=json

ParameterDescription

centralFeatureResultLayer

meanCenterResultLayer

medianCenterResultLayer

ellipseResultLayer

The output result.

Example:

{"url": 
"http://analysis.arcgis.com/arcgis/rest/services/tasks/gpserver/summarizecenteranddistribution/jobs/<jobId>/results/ellipseResultLayer"}

The result has properties for parameter name, data type, and value. The contents of value depends upon the OutputName parameter provided in the initial request.

  • If OutputName was provided, value contains the url to the feature service layer.

    {
    "paramName":"ellipseResultLayer", 
    "dataType":"GPString",
    "value":{"url":"<arcgis featureservice layer url>"}
    }

  • If OutputName was not provided, value contains a feature collection.

    {
    "paramName":"ellipseResultLayer",
    "dataType":"GPString",
    "value":{"featureCollection": ... }
    }

See Feature Output for more information about how the result layer or collection is accessed.