FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.1   R E S T    R E P O R T    T A S K

Summarize Points Endpoint

Aggregates data from a point layer (e.g. customer layer) to a polygon layer (e.g. trade area).

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/SummarizePoints/execute

Specific Parameters

Parameter

Description

AreaDescField (required)

Name of area description field in the Boundaries layer. Type string.

Boundaries (required)

The polygon layer whose features represent trade areas. Type DataLayer.

PointLayer (required)

A point layer containing point features to be summarized. Type PointLayer.

AdditionalFields (optional)

Additional fields of the input PointLayer layer to be aggregated for areas of the Boundaries layer. Type array of string.

AnalysisExtent (optional)

Data extent to restrict the analysis. Type ExtentData.

AreaIDField (optional)

Name of area ID field in the Boundaries layer. Type string.

Default: AREA_ID.

Other Parameters

Parameter

Description

OutputType (required)

Array of task output options. Options for this endpoint include rendering an output image (GetMapImage), creating a feature layer for subsequent analysis (GetFeatureClass), and creating a report (GetReport). Type array of TaskOutputType.

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

OutputAnalysisItem (optional)

Configuration options for storing the output feature layer in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem.

OutputReportItem (optional)

Configuration options for storing the output report in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem.

OutputSpatialReference (optional)

An option specifying the spatial reference to return the output feature layer. Type SpatialReference. If this parameter is missing, the output record set will be returned in the default spatial reference. See Get Default Spatial Reference lookup operation to query the default spatial reference.

RenderingParameters (optional)

Configuration options for rendering output when GetMapImage option is specified in the OutputType parameter. Type RenderingParameters.

ReturnGeometry (optional)

An option specifying the presence of the shape attribute in the returned record set. Type boolean.

Default: true.

StandardReportOptions (optional)

Report parameters. Type ReportOptions. The TemplateName parameter is ignored.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type TaskResultOutput

Remarks

This endpoint allows you to take point data (e.g. customer data) in Business Analyst along with any associated volumetric data and sum that data up to any boundary layer (e.g. Census Tracts). For example, if you needed to see the distribution of the sales data associated with your customer points across the ZIP Codes in your market, this endpoint would allow you to see total sales associated with each ZIP Code of your interest. It would perform this function by automatically selecting all the points which fall into each ZIP Code and then summing up the selected fields to each ZIP Code boundary.

 

The analysis can be restricted to an analysis extent if the AnalysisExtent parameter is specified. Attribute fields specified in the AdditionalFields array should contain numerical values.

Example Usage

The example below aggregates points to a custom trade area and generates a report.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/SummarizePoints/execute?
PointLayer={"RecordSet":{
  "geometryType":"esriGeometryPoint",
  "spatialReference":{"wkid":4326},
  "features":[
    {"geometry":{"x":-87.626201,"y":41.901602,"spatialReference":{"wkid":4326}},"attributes":{"SALES":2351}},
    {"geometry":{"x":-87.619119,"y":41.896152,"spatialReference":{"wkid":4326}},"attributes":{"SALES":5534}},
    {"geometry":{"x":-87.617189,"y":41.895179,"spatialReference":{"wkid":4326}},"attributes":{"SALES":1251}},
    {"geometry":{"x":-87.626748,"y":41.894449,"spatialReference":{"wkid":4326}},"attributes":{"SALES":552}},
    {"geometry":{"x":-87.620672,"y":41.891719,"spatialReference":{"wkid":4326}},"attributes":{"SALES":2854}}
  ]
}}&
AdditionalFields=SALES&
Boundaries={"RecordSet":{
  "geometryType":"esriGeometryPolygon",
  "spatialReference":{"wkid":4326},
  "features":[{
    "geometry":{
      "rings":[[
        [-87.628103,41.893271],
        [-87.614861,41.893480],
        [-87.619776,41.900846],
        [-87.628317,41.900764],
        [-87.628103,41.893271]
      ]],
      "spatialReference":{"wkid":4326}
    },
    "attributes":{"AREA_ID":"custom1","AREA_DESC":"Custom Trade Area","STORE_ID":"1"}
  }]
}}&
AreaDescField=AREA_Desc&
AreaIDField=AREA_ID&
StandardReportOptions={"ReportFormat":"PDF"}&
OutputType=GetReport&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"SummarizePoints.PDF",
      "dataType":"GPDataFile",
      "value":
      {
        "url":"http://localhost/arcgisoutput/_ags_T311AD1BF44B9BA7706033A9E7D743.pdf"
      }
    }
  ],
  "messages":
  [
  ]
}

See Also

Business Analyst Server REST Reference