FRAMES | NO FRAMES

 

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

Standard Geographies from Extent Endpoint

Geography location names and IDs are returned for a given extent.

 

Availability: Business Analyst web app, Business Analyst Server.

 

URL Example

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

Specific Parameters

Parameter

Description

AnalysisExtent (required)

Analysis extent to select locations. Type ExtentData.

GeoLevelID (required)

The unique identifier for the standard geography level. The list of available geography levels could be retrieved with Get Standard Geography Levels endpoint. Type string.

SpatialRelationship (required)

Specifies a relationship for selection locations having intersection with the analysis extent. Type esriSpatialRelEnum.

Other Parameters

Parameter

Description

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

compatibility (optional)

Business Analyst Server version the JSON output is compatible with. Type string.

f (optional)

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

Default: HTML.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

token

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

Returns

Array of StdGeographiesReturnedFeature containing the list of IDs and names of features selected. In the case of JSON and PJSON response types, the response format depends on the compatibility parameter value.

Example Usage

The example below requests an array of ID/Name locations from a standard geography level which touch the specified extent coordinates. 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/StdGeographiesFromExtent/execute?
AnalysisExtent={"Extent":{
  "spatialReference":{"wkid":4326},
  "xmin":-118.85,
  "xmax":-116.62,
  "ymin":31.11,
  "ymax":33.78
}}&
SpatialRelationship=esriSpatialRelContains&
GeoLevelID=US.ZIP5&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"StdGeographyFeatures",
      "dataType":"BAStdGeographiesFeatures",
      "value":
      [
        {
          "ID":"92059",
          "Name":"Pala"
        },
        ...
        {
          "ID":"92154",
          "Name":"San Diego"
        }
      ]
    }
  ],
  "messages":
  [
  ]
}

 

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

 

See Also

Business Analyst Server REST Reference