FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.1   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 Tree Endpoint

Returns the tree of standard geography levels.

 

Availability: Business Analyst Server.

 

URL Example

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

Parameters

Parameter

Description

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.

token

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

Returns

Variable of type string containing XML serialized tree of standard geography levels.

Example Usage

The example below requests an XML representation of a hierarchical tree of geography levels associated with Business Analyst Server core dataset.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/StdGeographiesTree/execute?
ActiveDatasetID=USA_ESRI_2011&
f=PJSON

 

Response

{
  "results":
  [
    {
    "paramName":"OutputText",
    "dataType":"GPString",
    "value":
"<StdGeoLevelsHierarchy>
  <Level ID=\"US.WholeUSA\" Caption=\"Whole USA\">
    <Branch />
  </Level>
  <Level ID=\"US.States\" Caption=\"States\">
    <Branch ID=\"USbyStates\" Caption=\"US by States\" Depth=\"1\" />
  </Level>
  <Level ID=\"US.Counties\" Caption=\"Counties\">
    <Branch ID=\"USbyCounties\" Caption=\"US by Counties\" Depth=\"2\" />
  </Level>
  <Level ID=\"US.Tracts\" Caption=\"Tracts\">
    <Branch ID=\"USbyTracts\" Caption=\"US by Tracts\" Depth=\"3\" />
  </Level>
  <Level ID=\"US.ZIP5\" Caption=\"ZIPs\">
    <Branch ID=\"USbyZIP5\" Caption=\"US by County by ZIP\" Depth=\"3\" />
    <Branch ID=\"StatesByZIP5\" Caption=\"States by ZIP\" Depth=\"2\" />
    <Branch ID=\"DMAsByZIP5\" Caption=\"DMA by ZIP\" Depth=\"2\" />
    <Branch ID=\"CBSAsByZIP5\" Caption=\"CBSA by ZIP\" Depth=\"2\" />
  </Level>
  <Level ID=\"US.BlockGroups\" Caption=\"BlockGroups\">
    <Branch ID=\"USByBG\" Caption=\"US by BlockGroups\" Depth=\"3\" />
  </Level>
  <Level ID=\"US.CBSA\" Caption=\"CBSA\">
    <Branch ID=\"USbyCBSA\" Caption=\"US by CBSA\" Depth=\"1\" />
    <Branch ID=\"StatesByCBSA\" Caption=\"States by CBSA\" Depth=\"2\" />
  </Level>
  <Level ID=\"US.DMA\" Caption=\"DMA\">
    <Branch ID=\"USbyDMA\" Caption=\"US by DMA\" Depth=\"1\" />
    <Branch ID=\"StatesByDMA\" Caption=\"States by DMA\" Depth=\"2\" />
  </Level>
  <Level ID=\"US.Places\" Caption=\"Cities and Towns\">
    <Branch ID=\"USbyPlaces\" Caption=\"Cities and Towns by State\" Depth=\"2\" />
  </Level>
  <Level ID=\"US.CD\" Caption=\"Congressional Districts\">
    <Branch ID=\"USbyCDs\" Caption=\"Congressional Districts by State\" Depth=\"2\" />
  </Level>
  <Level ID=\"US.CS\" Caption=\"County Subdivisions\">
    <Branch ID=\"USbyCSs\" Caption=\"County Subdivisions by State\" Depth=\"2\" />
  </Level>
</StdGeoLevelsHierarchy>"
    }
  ],
  "messages":
  [
  ]
}

 

NOTE: The XML string value in the response is split in lines for easy reading.

 

A number of subdivision branches can be associated with every geography level.

 

For example, there are four subdivision branches associated with the "US.ZIP5" geography level—"USbyZIP5", "StatesByZIP5", "DMAsByZIP5", and "CBSAsByZIP5". The "USbyZIP5" branch for this level represents a subdivision of USA in ZIPs having the depth of 3—the whole USA has the depth 0, US States have the depth 1, US Counties have the depth 2, and ZIP5 codes have the depth 3 in this subdivision branch.

 

See Also

Standard Geographies from Tree Endpoint

Business Analyst Server REST Reference