FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.2   R E S T   S T D   G E O G R A P H Y   U T I L I T Y

Create Standard Geographies Endpoint

Creates a study/trade area consisting of standard geography regions.

 

Availability: Business Analyst Server.

 

URL Example

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

Specific Parameters

Parameter

Description

FeatureList (required)

Array of features to be exported from standard geography levels. Type array of StdGeographiesFeaturesInLevel.

Other Parameters

Parameter

Description

OutputType (required)

Array of task output options. Options for this endpoint include creating a feature layer for subsequent analysis (GetFeatureClass). 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.

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.

ReturnGeometry (optional)

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

Default: true.

token

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

Returns

Variable of type TaskResultOutput whose RecordSet parameter contains features exported from standard geography levels.

Example Usage

The example below generates a study/trade area consisting of regions defined by a list. This particular example specifies a list of counties using five-digit Federal Information Processing Standard (FIPS) county codes. The list of available geography levels could be retrieved with Get Standard Geography Levels endpoint.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/CreateStdGeographies/execute?
FeatureList=[{"LevelID":"US.Counties","FeatureID":["01021","01045","01121"]}]&
OutputType=GetFeatureClass&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"OutputFeatureClass",
      "dataType":"GPFeatureRecordSetLayer",
      "value":
      {
        "geometryType":"esriGeometryPolygon",
        "spatialReference":
        {
          "wkid":4326
        },
        "fieldAliases":
        {
          "OBJECTID":"Object ID",
          "ID":"ID",
          "Names":"Names",
          "TA_DESC":"TA_DESC"
        },
        "fields":
        [
          {
            "name":"OBJECTID",
            "type":"esriFieldTypeOID",
            "alias":"Object ID"
          },
          ...
          {
            "name":"TA_DESC",
            "type":"esriFieldTypeString",
            "alias":"TA_DESC",
            "length":0
          }
        ],
        "features":
        [
          {
            "geometry":
            {
              "rings":
              [
                [
                  [
                    -85.791267,
                    31.215904
                  ],
                  ...
                  [
                    -85.791267,
                    31.215904
                  ]
                ]
              ],
              "spatialReference":
              {
                "wkid":4326
              }
            },
            "attributes":
            {
              "OBJECTID":1,
              "ID":"01045",
              "Names":"Dale County",
              "TA_DESC":"TA from Geography Level 'US.Counties': 01045"
            }
          },
          ...
          {
            "geometry":
            {
              "rings":
              [
                [
                  [
                    -86.503128,
                    33.179145
                  ],
                  ...
                  [
                    -86.503128,
                    33.179145
                  ]
                ]
              ],
              "spatialReference":
              {
                "wkid":4326
              }
            },
            "attributes":
            {
              "OBJECTID":3,
              "ID":"01121",
              "Names":"Talladega County",
              "TA_DESC":"TA from Geography Level 'US.Counties': 01121"
            }
          }
        ]
      }
    }
  ],
  "messages":
  [
  ]
}

 

NOTE: The response has been abbreviated where "..." is noted.

 

JSON Response Example Rendered with the ArcGIS API for JavaScript

Example Usage Rendering

 

See Also

Business Analyst Server REST Reference