使用方法
输入追踪网络的版本必须是 2 或更高版本。
- 在使用企业级地理数据库时,需要满足以下要求:
输入追踪网络参数值必须来自追踪网络服务。
注:
当作为门户追踪网络所有者或者具有管理员角色的门户帐户进行连接时,输入追踪网络参数值可以来自作为数据库追踪网络所有者建立的数据库连接。
门户追踪网络所有者可以查看并导出追踪网络中的任何追踪配置。其他用户只能查看和导出其创建的追踪配置。
.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>" } ]
使用“导出追踪配置”工具来自追踪网络的示例 JSON:
[ { "creator": "TN_Admin", "name": "Connected trace HUC12", "description": "Connected trace for HUC12", "traceType": 1, "configuration": {"{"includeBarriers":true,"validateConsistency":true,"ignoreBarriersAtStartingPoints":true,"allowIndeterminateFlow":true, "traversabilityScope":"junctionsAndEdges\","combineUsingOr":false,"isSpecificValue":true}],"functionBarriers":[], "functions":[],"outputFilters":[],"outputConditions":[],}",}, "resultTypes": "[{"type":"elements","includeGeometry":false,"includePropagatedValues":false,"networkAttributeNames":[],"diagramTemplateName":"","resultTypeFields":[]},{"type":"aggregatedGeometry","includeGeometry":false,"includePropagatedValues":false,"networkAttributeNames":[],"diagramTemplateName":"","resultTypeFields":[]}]", "tags": "connected,nhd,huc12" } ]
语法
arcpy.tn.ExportTraceConfigurations(in_trace_network, trace_config_name, out_json_file)
参数 | 说明 | 数据类型 |
in_trace_network | 包含要导出的追踪配置的追踪网络。 | Trace Network; Trace Network Layer |
trace_config_name [trace_config_name,...] | 要导出的追踪配置。 | String |
out_json_file | 输出 .json 文件。 | File |
代码示例
此示例脚本将从名为 HydroNetwork 的追踪网络中导出单个追踪配置。
import arcpy
arcpy.ExportTraceConfigurations_tn("HydroNetwork",
"{399F4M43-ASRV-45D5-5P4C-3GD474E672T4}",
r"C:\temp\exportedtraceconfigurations.json")
环境
许可信息
- Basic: 否
- Standard: 是
- Advanced: 是