摘要
Allows the setup of distance constraints at the specified level.
用法
The Territory Level format must be as follows: Level_Name[Level_Index]
The Distance Units parameter depends on the value of Measure Type. This value can be modified by UI or the SetupLevelParameter tool (see in_measure_type parameter).
Maximum Distance, Minimum Distance and Minimum Distance Between Centers values must be greater than zero.
语法
SetupLevelDistanceConstraints_TD_td (in_territory_solution_layer, in_level, {in_distance_units}, {in_maximum_distance}, {in_minimum_distance}, {in_centers_minimum_distance})
参数 | 说明 | 数据类型 |
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_distance_units (可选) | The Distance Units for the distance constraints.
| String |
in_maximum_distance (可选) | The Maximum distance from a territory's center. | Double |
in_minimum_distance (可选) | The Minimum distance from the center of a nearby territory. | Double |
in_centers_minimum_distance (可选) | The Minimum distance between territory centers. | Double |
代码实例
SetupLevelDistanceConstraints_TD example (Python window)
The following Python window script demonstrates how to use the tool in immediate mode.
import arcgisscripting
gp = arcgisscripting.create()
gp.SetupLevelDistanceConstraints_TD("new layer", "Territories[1]", "MILES", 100, 40, 80)
SetupLevelDistanceConstraints_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]"
distanceUnits = "MILES"
maximumDistance = 100
minimumDistance = 40
minimumCentersDistance = 80
# Execute tool
gp.SetupLevelDistanceConstraints_TD(solution, level, maximumDistance, minimumDistance, minimumCentersDistance)
环境
此工具不使用任何地理处理环境
许可信息
- ArcGIS for Desktop Basic: 需要 Business Analyst
- ArcGIS for Desktop Standard: 需要 Business Analyst
- ArcGIS for Desktop Advanced: 需要 Business Analyst