arcpy.un.MigrateToUtilityNetwork(output_folder, service_territory_feature_class, {utility_network_name}, {dataset_name}, {output_name}, {un_mapping}, {domain_networks}, {in_standalone_classes}, {load_data}, {merge_fields}, {include_related}, {include_attachments}, utility_network_version)
|
名称
|
说明
|
数据类型
|
|
output_folder
|
将包含 output_name 参数中指定的输出文件夹和移动地理数据库的文件夹位置。
|
Folder
|
|
service_territory_feature_class
|
将用于创建公共设施网络地理范围的面要素类。 无法在此范围外创建公共设施网络要素。
|
Feature Set
|
|
utility_network_name
(可选)
|
公共设施网络名称。 默认为 Network。
|
String
|
|
dataset_name
(可选)
|
包含公共设施网络的要素数据集的名称。 默认为 UtilityNetwork。
|
String
|
|
output_name
(可选)
|
输出文件夹和移动地理数据库的名称。 默认为 MigrationDatabase。
|
String
|
|
un_mapping
[un_mapping,...]
(可选)
|
用于生成和映射输出地理数据库中公共设施网络的资产组和资产类型的要素类列表,及其详细信息。
值表列:
Source Class—The source feature class that will be migrated to a utility network.
Target Class—The target domain network class for each Source Class value.
Asset Group—The name of the asset group created in the target domain network class. By default, this is assigned the name from Source Class.
Asset Type—The subtype or field with a coded value domain that will be used to define the asset types for the asset group created in Target Class. If the data contains subtypes, or another field containing a coded value domain that can be used to meaningfully identify different types of equipment in the class, this can be specified as the field to be used for the asset type in Target Class. When a subtype field is specified for Asset Type, existing codes are maintained if all codes are between 1 and 1023. If a code falls outside this range, all asset types will be created using the subtype descriptions and an automatically incrementing number starting at 1.
Is Controller—Specify whether the feature classes can act as sources or sinks in the domain network. This enables features belonging to this asset group to act as subnetwork controllers in the output domain network.
CONTROLLER—The specified asset group and asset types are assigned the subnetwork controller network category and are eligible to define the origin of a subnetwork. If the source feature class participates in a geometric network, the values from the Ancillary Role field are used to determine which features for the asset group and asset type can serve as subnetwork controllers in the utility network. These features are output to the folder specified for the Output Location parameter in a controllers.csv file for later import into the output utility network. When no Ancillary Role field is present, subnetwork controllers can be set manually for the specified asset types in the output utility network.
NO_CONTROLLER—The specified asset group and asset types are not assigned the subnetwork controller network category and are not eligible to participate as subnetwork controllers in the domain network.
|
Value Table
|
|
domain_networks
[domain_networks,...]
(可选)
|
定义将在输出公共设施网络中创建的域网络 或网络的名称和属性。
值表列:
Name—The name of the domain network. This describes the resource that the domain network manages and will prefix all network classes added to the domain network.
Subnetwork Controller Type—The subnetwork controller type determines how the network resource flows through all subnetworks of a domain network. Specify whether resources originate from a point in the network (source) or flow toward a point in the network (sink).
SOURCE—If the domain network is defined with the source subnetwork controller type, a resource can only flow away from or exit subnetwork controllers, not toward or into them.
SINK—If the domain network is defined with a sink subnetwork controller type, a resource can only flow toward and enter subnetwork controllers, not away from or exit them.
Tier Definition—Specify the tier definition type for the domain network, either partitioned or hierarchical. A tier definition denotes the organization of the tiers relative to the rest of the network.
PARTITIONED—Features in a domain network with a partitioned tier definition are independent and can only exist in one tier. Features can exist in one or multiple subnetworks. The relationship between tiers in partitioned domain networks is ordered and linear. For example, a transmission tier delivers the resource over a long distance, and a distribution tier serves the resource to the customer.
HIERARCHICAL—Features in a domain network with a hierarchical tier definition can be modeled in multiple types of subnetworks. For example, pressure zones and isolation zones can be defined in two tiers within a tier group. A gas or water feature can be part of both the pressure and isolation tiers.
|
Value Table
|
|
in_standalone_classes
[in_standalone_classes,...]
(可选)
|
指不参与公用设施网络的独立类,将被复制到输出地理数据库中。
|
Table
|
|
load_data
(可选)
|
指定是将源类的数据加载至输出公用设施网络,还是仅在输出公共设施网络中更新源类的模式。
|
Boolean
|
|
merge_fields
(可选)
|
指定是否将源类的字段合并到输出公共设施网络类的字段中。
|
Boolean
|
|
include_related
(可选)
|
指定是否将源类和独立类的相关类包含在输出公共设施网络中。
|
Boolean
|
|
include_attachments
(可选)
|
指定是否创建附件表,并将源类的附件包含在输出地理数据库中。
|
Boolean
|
|
utility_network_version
|
指定将要创建的公共设施网络版本。
|
String
|
派生输出
|
名称
|
说明
|
数据类型
|
|
out_utility_network
|
输出公共设施网络。
|
Utility Network
|
|
out_controller
|
输出子网控制器。
|
File
|
|
out_layer_file
|
包含公共设施网络控制的各类子类型组图层 的输出图层文件。
|
File
|
|
out_loading_workspace
|
用于将源数据映射至输出公共设施网络的数据加载工作空间。 可用于在不创建新的移动地理数据库的前提下,将数据重新加载至输出公共设施网络。
|
File
|
代码示例
MigrateToUtilityNetwork 示例(Python 窗口)
使用 MigrateToUtilityNetwork 函数从 LocalGovernment.gdb 现有几何网络中的源类创建基于源的等级水域网络。 其中,WaterLine 等要素类定义了资产类型,且 wNetworkStructure 资产组的资产类型被指定为控制器。
arcpy.un.MigrateToUtilityNetwork(r"C:\temp", r"C:\temp\LocalGovernment.gdb\wServiceBoundary", "Network", "UtilityNetwork", "MigrationDatabase", r"C:\temp\LocalGovernment.gdb\WaterDistribution\wConstructionLine StructureLine wConstructionLine # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wControlValve WaterDevice wControlValve # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wCasing StructureLine wCasing # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wCurbStopValve WaterDevice wCurbStopValve # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wFitting WaterDevice wFitting FITTINGTYPE #;C:\temp\LocalGovernment.gdb\WaterDistribution\wHydrant WaterDevice wHydrant # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wLateralLine WaterLine wLateralLine LINETYPE #;C:\temp\LocalGovernment.gdb\WaterDistribution\wMain WaterLine wMain # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wNetworkStructure WaterDevice wNetworkStructure STRUCTTYPE true;C:\temp\LocalGovernment.gdb\WaterDistribution\wPump WaterDevice wPump # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wSamplingStation WaterJunction wSamplingStation # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wServiceConnection WaterDevice wServiceConnection SERVICETYPE #;C:\temp\LocalGovernment.gdb\WaterDistribution\wStructure StructureBoundary wStructure STRUCTTYPE #;C:\temp\LocalGovernment.gdb\WaterDistribution\wSystemValve WaterDevice wSystemValve # #;C:\temp\LocalGovernment.gdb\WaterDistribution\wTestStation WaterDevice wTestStation # #", "Water SOURCE HIERARCHICAL", r"C:\temp\LocalGovernment.gdb\WaterDistribution\wAbandonedLine;C:\temp\LocalGovernment.gdb\WaterDistribution\wAbandonedPoint;C:\temp\LocalGovernment.gdb\WaterDistribution\wConstructionLine;C:\temp\LocalGovernment.gdb\WaterDistribution\wElevationPt;C:\temp\LocalGovernment.gdb\WaterDistribution\wPressureZone", "LOAD", "MERGE", "INCLUDE", "DO_NOT_INCLUDE", "VERSION_7")