摘要
Allows the setup of parameter levels to create or balance territories.
用法
The format for the Territory Level is as follows: Level_Name[Level_Index]
The range for the Compactness parameter is from 0 to 100.
语法
SetupLevelTerritoryShapeParameters_TD_td (in_territory_solution_layer, in_level, {in_measure_type}, {in_compactness}, {in_use_only_closest}, {in_territory_center_location}, {in_summary_attribute})
参数 | 说明 | 数据类型 |
in_territory_solution_layer | The Territory Solution layer used to setup the parameters. | GP TD Layer |
in_level | The Territory Level to modify. | String |
in_measure_type (可选) | The Type of distance measure for building the territory shape.
| String |
in_compactness (可选) | This parameter adjusts the preference between territory shape and variable balance. A low value of compactness means good balance but shape is compromised. | Integer |
in_use_only_closest (可选) | This option overrides previous balancing. Minimum attribute capacity constraints can be used to ensure a more ideal territory shape. Territories can only acquire features that are closest to their territory center, instead of centers of surrounding territories. This essentially puts less emphasis on statistical inputs and applies a heavier weight to maintaining a territory boundary.
| Boolean |
in_territory_center_location (可选) | The location of a non-fixed (not created from seed points) center is defined with this parameter. The territory center will change automatically as the territory shape changes but will always reside inside the territory boundary.
| String |
in_summary_attribute (可选) | The Territories can be calculated using the locations of each geography element or the summary value assigned to each geography element. This parameter is used to specify the base level field to calculate the territory. Set an empty value when using spatial locations only. | Field |
代码实例
SetupLevelTerritoryShapeParameters_TD example (Python window)
The following Python window script demonstrates how to use the tool in immediate mode.
import arcgisscripting
gp = arcgisscripting.create()
gp.SetupLevelTerritoryShapeParameters_TD("new layer", "Territories[1]", "STRAIGHT_LINE_DISTANCE", 50, "USE_ALL_FEATURES", "MEAN_CENTER", "TOTPOP_CY")
SetupLevelTerritoryShapeParameters_TD example 2 (stand-alone script)
The following stand-alone script demonstrates how to use the tool.
# Import system modules
import arcgisscripting
gp = arcgisscripting.create()
# Set local variables
solution = "new layer"
level = "Territories[1]"
measureType = "STRAIGHT_LINE_DISTANCE"
compactness = 50
useFeatures = "USE_ALL_FEATURES"
territoryCenterLocation = "MEAN_CENTER"
summaryAttribute = "TOTPOP_CY"
# Execute tool
gp.SetupLevelTerritoryShapeParameters_TD(solution, level, measureType, compactness, useFeatures, territoryCenterLocation, summaryAttribute)
环境
此工具不使用任何地理处理环境
许可信息
- ArcGIS for Desktop Basic: 需要 Business Analyst
- ArcGIS for Desktop Standard: 需要 Business Analyst
- ArcGIS for Desktop Advanced: 需要 Business Analyst