获得 Business Analyst 许可后可用。
描述
Balances existing territories.
使用方法
The Territory Level format must be as follows: Level_Name[Level_Index].
The Balancing variables should be specified, via UI or the Setup Level Balancing Variables tool.
The Distance constraints (see Maximum Distance, Minimum Distance and Minimum Distance Between Centers parameters) or Capacity constraints can be specified via UI or the appropriate GP tool.
语法
arcpy.td.BalanceTerritories(in_territory_solution_layer, in_level, {in_balancing_method}, {in_autofill_extent}, {in_keep_invalid_territories})
参数 | 说明 | 数据类型 |
in_territory_solution_layer | The Territory Solution layer to be balanced. | GP TD Layer |
in_level | The Territory Level to modify. | String |
in_balancing_method (可选) | This parameter ensures that all available features will be used while modifying territories.
| Boolean |
in_autofill_extent (可选) | This parameter ensures that all unassigned features will be added to their closest territories regardless of the constraint parameters. This option may affect the assigned parameters in order to include all territories in the solution.
| Boolean |
in_keep_invalid_territories (可选) | This parameter ensures that all modified territories, exceeding constraints, will not be automatically emptied. This is useful for finding the reasons why there are a number of empty territories (for example, if constraints are opposite each other).
| Boolean |
代码示例
The following Python window script demonstrates how to use the Business Analyst geoprocessing tool in immediate mode.
import arcgisscripting
gp = arcgisscripting.create()
gp.BalanceTerritories_TD("new layer", "Territories[1]", "EXTEND_COVERAGE_AREA", "DO_NOT_AUTO_FILL_EXTENT", "DO_NOT_OVERRIDE_CONSTRAINTS")
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]"
balanceMethod = "EXTEND_COVERAGE_AREA"
autoFillExtent = "DO_NOT_AUTO_FILL_EXTENT"
overrideConstraints = "DO_NOT_OVERRIDE_CONSTRAINTS"
# Execute tool
gp.BalanceTerritories_TD(solution, level, balanceMethod, autoFillExtent, overrideConstraints)
环境
此工具不使用任何地理处理环境。
许可信息
- Basic: 需要 Business Analyst
- Standard: 需要 Business Analyst
- Advanced: 需要 Business Analyst
相关主题
- Add Territory Level
- An Overview of the Improve Territories Toolset
- Create Territories
- Import Territories From Database
- Remove Solution Extent
- Setup Level Balancing Variables
- Setup Level Capacity Constraints
- Setup Level Distance Constraints
- Setup Level Territory Shape Parameters
- Setup Solution Barriers
- Setup Solution Extent By Boundary of Layer
- Setup Solution Extent By Current Map View
- Setup Solution Extent By Current Selection
- Setup Solution Restricted Areas