获得 Business Analyst 许可后可用。
描述
Creates a new territory solution with two levels and loads input features into the base level.
使用方法
Input features for the base level can be a point feature layer or a polygon feature layer.
The type of input layer will determine how the base level is displayed—for example, points or polygons.
Additional geometries can be created to display either boundary centers or polygon boundaries.
Additional layers can be created to display the base level—for example, centers of polygons or boundaries of points.
-
The ID Field and the Name Field parameters are optional and are used to uniquely identify the features in the base layer. Examples are ZIP Code or census tract names. If no ID field is provided, a unique ID will be generated automatically.
By default, all of the fields in the input layer will be added to the territory solution. You can turn off field visibility by right-clicking the column header and clicking Hide Field if you do not want the field to be added to the territory solution.
The %Number% variable determines where the integer number is placed, either after or before the territory name—for example, Territory %Number% produces Territory 1, Territory 2, and so forth, whereas %Number% Territory produces 1 Territory, 2 Territory, and so forth.
A mask layer is only supported for a point-based territory solution.
语法
arcpy.td.CreateTerritorySolution(in_features, solution_name, {id_field}, {name_field}, {territory_level_name}, {default_territory_name}, {in_boundary_mask})
参数 | 说明 | 数据类型 |
in_features | The geometry or data features that will be used as the base level of the created solution. The level will have the same name as the input features. | Feature Layer |
solution_name | The name of the territory solution to be created. | String |
id_field (可选) | The field that contains ID values for objects in the level. | Field |
name_field (可选) | The field that contains name values for objects in the level. | Field |
territory_level_name (可选) | The name of the territory level—for example, level 2. | String |
default_territory_name (可选) | The prefix for the names of the new territories that will be created—for example, Territory 1, Territory 2, and Territory 3 or District 1, District 2, and District 3. | String |
in_boundary_mask (可选) | The layer that is used as a mask to limit the growth of point-based layers. | Feature Layer |
派生输出
名称 | 说明 | 数据类型 |
out_territory_solution | The output territory solution. | Group Layer |
代码示例
The following Python window script demonstrates how to use the CreateTerritorySolution tool.
import arcpy
arcpy.td.CreateTerritorySolution("CensusTacts", "Territory Solution", "CensusID", "TractName", "Territories", "Territory", None)
环境
许可信息
- Basic: 需要 Business Analyst
- Standard: 需要 Business Analyst
- Advanced: 需要 Business Analyst