导入追踪配置 (公共设施网络)

描述

将 JSON (.json) 文件中的追踪配置导入公共设施网络。

此工具可以与导出追踪配置工具一起使用。

了解有关导入追踪配置的详细信息

使用方法

  • 输入公共设施网络必须是 5 或更高版本。

  • 使用企业级地理数据库时,必须满足以下要求:
    • 输入公共设施网络参数值必须来自公共设施网络服务。
    注:
  • 追踪配置必须位于单个 .json 文件中。

  • .json 文件中的信息按以下格式存储:

    [
    	{
    		"creator": "<property representing the connected portal account on creation>",
    		"name": "<property  representing the trace configuration name>",
    		"description": "<property representing the description of the trace configuration>",
    		"traceType": <property representing the trace type>,
    		"configuration": <property representing the collection of trace configuration parameters>,
    		"resultTypes": "[<property representing the types of results to return>]",
    		"tags": "<property representing user provided tags>"
    	}
    ]

    示例:

    [
    	{
    		"creator": "portaladmin_un",
    		"name": "Connected_RMT002_A",
    		"description": "Connected trace on subnet RMT002",
    		"traceType": 1,
    		"configuration": "{"includeBarriers":true,"validateConsistency":true,"ignoreBarriersAtStartingPoints":false,"allowIndeterminateFlow":false,"shortestPathNetworkAttributeName":"","traversabilityScope":"junctionsAndEdges","conditionBarriers":[],"functionBarriers":[],"functions":[],"outputFilters":[],"outputConditions":[],"pathDirection":"noDirection"}",
    		"resultTypes": "[{"type":"elements","includeGeometry":false,"includePropagatedValues":false,"networkAttributeNames":[],"diagramTemplateName":"","resultTypeFields":[]},{"type":"aggregatedGeometry","includeGeometry":false,"includePropagatedValues":false,"networkAttributeNames":[],"diagramTemplateName":"","resultTypeFields":[]}]",
    		"tags": "["connected","RMT002"]"
    	}
    ]

语法

arcpy.un.ImportTraceConfigurations(in_utility_network, in_json_file)
参数说明数据类型
in_utility_network

包含要导出的追踪配置的公共设施网络。

Utility Network; Utility Network Layer
in_json_file

包含要导入的追踪配置的 .json 文件。

File

派生输出

名称说明数据类型
out_utility_network

更新的公共设施网络。

公共设施网络

代码示例

ImportTraceConfigurations 示例(Python 窗口)

此示例脚本会将追踪配置导入到名为 ElecNetwork的公共设施网络。

import arcpy
arcpy.ImportTraceConfigurations_un("ElecNetwork", 
                                   r"c:\temp\trace_configurations.json")

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 否
  • Standard: 是
  • Advanced: 是

相关主题