FRAMES | NO FRAMES

 

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

Points in Polygon Report Endpoint

Creates a report on distribution of points within polygons.

 

Availability: Business Analyst Server.

 

URL Example

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

Specific Parameters

Parameter

Description

BoundaryIDField (required)

Name of the unique area ID field in the BoundaryLayer layer. Type string.

BoundaryLayer (required)

The polygon layer whose areas are used in the report. Type DataLayer.

FeatureLayer (required)

The point layer containing point features whose locations are tested to lay within areas of the BoundaryLayer layer. PointLayer.

AdditionalFields (optional)

Additional fields of the FeatureLayer layer. Type array of string.

AnalysisExtent (optional)

Data extent to restrict the analysis. Type ExtentData.

ReportOrientation (optional)

Orientation of the report. Default orientation is the portrait orientation. Type esriReportOrientation.

Default: esriReportOrientationPortrait.

Other Parameters

Parameter

Description

OutputType (required)

Array of task output options. Options for this method include creating a report (GetReport). Type array of TaskOutputType.

StandardReportOptions (required)

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

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.

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.

token

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

Returns

Variable of type TaskResultOutput

Remarks

The analysis can be restricted to an analysis extent if the AnalysisExtent parameter is specified.

 

The AdditionalFields parameter allows user to show additional fields of the boundary layer in the report.

Example Usage

The example below generates a report on distribution of five customers within a trade area.

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/PointsInPolygonReport/execute?
FeatureLayer={
  "RecordSet":{
    "geometryType":"esriGeometryPoint",
    "spatialReference":{"wkid":4326},
    "features":[
      {"geometry":{"x":-87.626201,"y":41.901602,"spatialReference":{"wkid":4326}},"attributes":{"STOREID":"1"}},
      {"geometry":{"x":-87.619119,"y":41.896152,"spatialReference":{"wkid":4326}},"attributes":{"STOREID":"2"}},
      {"geometry":{"x":-87.617189,"y":41.895179,"spatialReference":{"wkid":4326}},"attributes":{"STOREID":"3"}},
      {"geometry":{"x":-87.626748,"y":41.894449,"spatialReference":{"wkid":4326}},"attributes":{"STOREID":"4"}},
      {"geometry":{"x":-87.620672,"y":41.891719,"spatialReference":{"wkid":4326}},"attributes":{"STOREID":"5"}}
    ]
  }
}&
AdditionalFields=STOREID&
BoundaryLayer={
  "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","STORE_ID":"1"}
    }]
  }
}&
BoundaryIDField=AREA_ID&
StandardReportOptions={
  "ReportFormat":"PDF",
  "ReportHeader":[{"key":"subtitle","value":"Custom Report Title"}]
}&
OutputType=GetReport&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"Points In Polygon Report P.PDF",
      "dataType":"GPDataFile",
      "value":
      {
        "url":"http://localhost/arcgisoutput/_ags_TE9A2329B74D33997828F533C83A9A.pdf"
      }
    }
  ],
  "messages":
  [
  ]
}

 

See Also

Business Analyst Server REST Reference