FRAMES | NO FRAMES
StdGeographiesFromTree Method

Geography location names and IDs are returned for a query to the hierarchy of standard geography levels.

Availability: Business Analyst Server.

StdGeographiesReturnedFeature[] StdGeographiesFromTree ( 
    StdGeographiesFromTreeParams  Parameters 
);

Parameter Description
Parameters Geographic search parameters. Type StdGeographiesFromTreeParams.

Returns

Variable of type StdGeographiesReturnedFeature[]

Examples

The example below searchs for depth-two items of "USbyZIP5" branch having the string "San Diego" in their name and returns all their direct child items. In other words, this example request all ZIP5 codes (depth-three items) belonging to the San Diego County (depth-two item).

C#
// Instantiate the BAServerHelper class to access analysis methods
BAServerHelper baServerHelper = new BAServerHelper();
baServerHelper.ActiveDatasetID = "USA_ESRI"; // Optional parameter
 
StdGeographiesFromTreeParams parameters = new StdGeographiesFromTreeParams();
 
// Set specific analysis parameters
parameters.BranchID = "USbyZIP5";   // Branch of the tree
 
// Set the geography level depth for the given branch,
// e.g. the level depth in "USbyZIP5" branch is
// 0 for whole USA,
// 1 for States,
// 2 for Counties, and
// 3 for ZIPs
parameters.Depth = 2;               // Counties level depth
parameters.Criterion = "San Diego"; // Search criterion
 
StdGeographiesReturnedFeature[] features = baServerHelper.StdGeographiesFromTree(parameters);

See Also