arcpy.locref.ConfigureRouteDominanceRules(in_feature_class, configure_type, rule_name, {updated_rule_name}, {source_table_name}, {fields}, {order_method}, {order_type}, {prioritized_exceptions})
|
名称
|
说明
|
数据类型
|
|
in_feature_class
|
输入要素类。 仅可使用已注册的 LRS 网络要素类。
|
Feature Layer
|
|
configure_type
|
指定将应用于 in_feature_class 参数值的配置类型。
ADD—新规则将添加到配置中。
UPDATE—将在配置中更新现有规则。
DELETE—将从配置中删除现有规则。
|
String
|
|
rule_name
|
将添加、更新或删除的规则名称。 规则名称最多可包含 30 个字符。
|
String
|
|
updated_rule_name
(可选)
|
规则的更新名称。 此参数仅在将 UPDATE 指定为 configure_type 参数值时使用。
|
String
|
|
source_table_name
(可选)
|
注册到 in_feature_class 参数值的源事件表或要素类。 或者,可以使用网络要素类。 仅支持非跨线事件。
|
String
|
|
fields
[fields,...]
(可选)
|
源表中的属性字段别名。 如果使用多个字段,它们将被串连起来。
|
String
|
|
order_method
(可选)
|
指定路径优先级排序是否将由较小或较大的值确定。
|
String
|
|
order_type
(可选)
|
指定在评估数字或字母数字字符串时将使用的排序类型。
|
String
|
|
prioritized_exceptions
(可选)
|
用户提供的异常的逗号分隔列表。
|
String
|
派生输出
|
名称
|
说明
|
数据类型
|
|
out_feature_class
|
更新的 LRS 网络要素类。
|
Feature Layer
|
代码示例
ConfigureRouteDominanceRules 示例 1(Python 窗口)
演示了如何使用 Python 窗口中的 ConfigureRouteDominanceRules 函数添加路径优先级规则。
# Name: ConfigureRouteDominanceRules_Pro_ex1.py
# Description: Adds a rule to determine the dominant route in a network
# where there are concurrent routes.
# Requirements: ArcGIS Location Referencing
# Local tool variables
in_feature_class = "C:\\LRdata\\LR.SDE\\LRSDataset\\RouteNetwork"
configure_type = "ADD"
rule_name = "Rule6"
updated_rule_name = ""
source_table_name = "FunctionalClass"
fields = "FunctionalClass"
order_method = "LESSER"
order_type = "NUMERIC"
prioritized_exceptions = ""
# Run the tool
arcpy.locref.ConfigureRouteDominanceRules(in_feature_class, configure_type, rule_name,
updated_rule_name, source_table_name, fields,
order_method, order_type, prioritized_exceptions)
ConfigureRouteDominanceRules 示例 2(Python 窗口)
演示了如何使用 Python 窗口中的 ConfigureRouteDominanceRules 函数更新路径优先级规则。
# Name: ConfigureRouteDominanceRules_Pro_ex2.py
# Description: Updates a rule to determine the dominant route in a network
# where there are concurrent routes.
# Requirements: ArcGIS Location Referencing
# Local tool variables
in_feature_class = "C:\\LRdata\\LR.SDE\\LRSDataset\\RouteNetwork"
configure_type = "UPDATE"
rule_name = "Rule6"
updated_rule_name = "Rule7"
source_table_name = "FunctionalClass"
fields = "FunctionalClass"
order_method = "GREATER"
order_type = "NUMERIC"
prioritized_exceptions = ""
# Run the tool
arcpy.locref.ConfigureRouteDominanceRules(in_feature_class, configure_type, rule_name,
updated_rule_name, source_table_name, fields,
order_method, order_type, prioritized_exceptions)
ConfigureRouteDominanceRules 示例 3(独立脚本)
演示了如何使用独立脚本中的 ConfigureRouteDominanceRules 函数删除路径优先级规则。
# Name: ConfigureRouteDominanceRules_Pro_ex3.py
# Description: Deletes a route dominance rule from the configured rules as a stand-alone script.
# Requirements: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Local tool variables
in_feature_class = "C:\\LRdata\\LR.SDE\\LRSDataset\\RouteNetwork"
configure_type = "DELETE"
rule_name = "Rule3"
updated_rule_name = ""
source_table_name = ""
fields = None
order_method = ""
order_type = ""
prioritized_exceptions = ""
# Run the tool
arcpy.locref.ConfigureRouteDominanceRules(in_feature_class, configure_type, rule_name,
updated_rule_name, source_table_name, fields,
order_method, order_type, prioritized_exceptions)
ConfigureRouteDominanceRules 示例 4(独立脚本)
演示了如何使用独立脚本中的 ConfigureRouteDominanceRules 函数添加具有异常的路径优先级规则。
# Name: ConfigureRouteDominanceRules_Pro_ex4.py
# Description: Add a rule as a stand-alone script with prioritized exceptions
# to determine the dominant route in a network with concurrent routes.
# Requirements: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Local tool variables
in_feature_class = "C:\\LRdata\\LR.SDE\\LRSDataset\\RouteNetwork"
configure_type = "ADD"
rule_name = "Rule8"
updated_rule_name = ""
source_table_name = "RouteNetwork"
fields = "RouteName"
order_method = "LESSER"
order_type = "ALPHANUMERIC"
prioritized_exceptions = "US62"
# Run the tool
arcpy.locref.ConfigureRouteDominanceRules(in_feature_class, configure_type, rule_name,
updated_rule_name, source_table_name, fields,
order_method, order_type, prioritized_exceptions)