FRAMES | NO FRAMES
ThresholdRingsRadii Method

Calculates radii of threshold rings.

Availability: Business Analyst Server.

ThresholdRingRadii[] ThresholdRingsRadii ( 
    ThresholdRingRadiiParams  Parameters 
);

Parameter Description
Parameters Configuration options. Type ThresholdRingRadiiParams.

Returns

Variable of type ThresholdRingRadii[]

Remarks

The ThresholdRingsRadii method calculates radii of trade areas that expand out from the store locations until they meet a specified criteria. You define the criteria, or size of each ring, manually.

Usage Tips

Examples

The example below generates and returns radius values of threshold rings.

C#
// Instantiate the BAServerHelper class to access analysis methods
BAServerHelper baServerHelper = new BAServerHelper();
baServerHelper.ActiveDatasetID = "USA_ESRI"; // Optional parameter
 
// ========= STEP 1: Create a store layer
 
// Create a PointRecord array of 1 store location.
PointRecord[] storePoints = new PointRecord[1];
 
storePoints[0] = new PointRecord();
storePoints[0].Name = "site1";
storePoints[0].Description = "study_site";
storePoints[0].StoreID = "1";
storePoints[0].Latitude = 34.057596;
storePoints[0].Longitude = -117.195683;
 
CustomerStoreSetupByCoordinatesParameters storeSetupParameters = new CustomerStoreSetupByCoordinatesParameters();
 
// Set specific analysis parameters
storeSetupParameters.GeocodeCustomers = false;
storeSetupParameters.NameField = "Name";
storeSetupParameters.Points = storePoints;
storeSetupParameters.StoreIDField = "STORE_ID";
 
// Set other parameters
RenderingParameters imageOptions = null;
TaskOutputType[] outputOptions = new TaskOutputType[] { TaskOutputType.GetFeatureClass };
esriFolderItem outputLayer = null;
 
TaskResultOutput storeSetupResult =
    baServerHelper.CustomerStoreSetupByCoordinates(storeSetupParameters, imageOptions, outputOptions, outputLayer);
 
PointLayer storeLayer = new PointLayer();
storeLayer.RecordSet = storeSetupResult.RecordSet;
 
// ========= STEP 2: Execute the analysis
 
StdLayer stdLayer = new StdLayer();
stdLayer.ID = "US.BlockGroups";
DataLayer thresholdLayer = new DataLayer();
thresholdLayer.StdLayer = stdLayer;
 
ThresholdRingsRadiiParams parameters = new ThresholdRingsRadiiParams();
 
// Set specific analysis parameters
parameters.OutputUnits = esriUnits.esriMiles;
parameters.Radii = new double[] { 1000, 3000, 5000 };
parameters.SingleStoreID = "1";
parameters.StoreIDField = "STORE_ID";
parameters.Stores = storeLayer;
parameters.SummarizationField = "TOTPOP_CY";
parameters.ThresholdData = thresholdLayer;
 
ThresholdRingRadii[] ringsRadii = baServerHelper.ThresholdRingsRadii(parameters);
 
//  Save the threshold rings radius results to a string array
string[] ringsRadiiDescriptions = new string[ringsRadii.Length];
 
for (int i = 0; i < ringsRadii.Length; i++)
{
    string[] stringRadii = new string[ringsRadii[i].Radii.Length];
    for (int j = 0; j < ringsRadii[i].Radii.Length; j++)
    {
        stringRadii[j] = ringsRadii[i].Radii[j].ToString();
    }
    ringsRadiiDescriptions[i] = string.Format("STORE ID: {0}; RING RADII: {1}",
        ringsRadii[i].StoreID, string.Join(" ", stringRadii));
}

See Also