Configure Route Dominance Rules (Location Referencing)

摘要

Configures a set of rules to determine the dominant route in a network where there are concurrent routes.

使用情况

  • The Order Type parameter's Numeric option supports numbers only, such as 1, 2, 11, 22. The Alphanumeric option supports both numbers and text, such as 1, 2, 11, 22 and 1, 11A, 22A, 22B.

  • When multiple fields are configured using the Fields parameter, the field values are concatenated in the order in which the fields have been added. For example, if the RouteType field is added first and has a value of SR and the RouteNumber field is added second and has a value of 18, the resulting concatenated field is SR18.

    For example, if SR18 is a multifield route ID that comprises the RouteType (SR) and RouteNumber (18) fields, select RouteType and RouteNumber for the Fields parameter.

  • When the Exceptions parameter is specified, route dominance is determined first by matching exceptions in the order in which they are present in the list, and then by the configured rules. The exception field values are comma-separated.

    For example, if Exceptions values are configured for Route3, Route7, and Route9, these exceptions are considered as dominant routes in their listed order before any configured rules are considered.

参数

标注说明数据类型
LRS Network Feature Class

The input feature class. Only a registered LRS Network feature class can be used.

Feature Layer
Configure Type

Specifies the type of configuration that will be applied to the LRS Network Feature Class parameter value.

  • AddA new rule will be added to the configuration.
  • UpdateAn existing rule will be updated.
  • DeleteAn existing rule will be deleted.
String
Rule Name

The name of the rule that will be added, updated, or deleted. The rule name can be up to 30 characters.

String
Updated Rule Name
(可选)

The updated name of the rule. This parameter is only used when Update is specified as the Configure Type parameter value.

String
Source Table Name
(可选)

The source event table or feature class registered to the LRS Network Feature Class parameter value. Alternatively, the network feature class can be used. Only nonspanning line events are supported.

String
Fields
(可选)

The attribute field aliases in the source table. If multiple fields are used, they will be concatenated.

String
Order Method
(可选)

Specifies whether route dominance ordering will be determined by lesser or greater values.

String
Order Type
(可选)

Specifies the ordering type that will be used when evaluating numeric or alphanumeric strings.

String
Prioritized Exceptions
(可选)

A comma-separated list of user-provided exceptions.

String

派生输出

标注说明数据类型
Output Network Feature Class

The updated LRS Network feature class.

Feature Layer

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

The input feature class. Only a registered LRS Network feature class can be used.

Feature Layer
configure_type

Specifies the type of configuration that will be applied to the in_feature_class parameter value.

  • ADDA new rule will be added to the configuration.
  • UPDATEAn existing rule will be updated.
  • DELETEAn existing rule will be deleted.
String
rule_name

The name of the rule that will be added, updated, or deleted. The rule name can be up to 30 characters.

String
updated_rule_name
(可选)

The updated name of the rule. This parameter is only used when UPDATE is specified as the configure_type parameter value.

String
source_table_name
(可选)

The source event table or feature class registered to the in_feature_class parameter value. Alternatively, the network feature class can be used. Only nonspanning line events are supported.

String
fields
[fields,...]
(可选)

The attribute field aliases in the source table. If multiple fields are used, they will be concatenated.

String
order_method
(可选)

Specifies whether route dominance ordering will be determined by lesser or greater values.

String
order_type
(可选)

Specifies the ordering type that will be used when evaluating numeric or alphanumeric strings.

String
prioritized_exceptions
(可选)

A comma-separated list of user-provided exceptions.

String

派生输出

名称说明数据类型
out_feature_class

The updated LRS Network feature class.

Feature Layer

代码示例

ConfigureRouteDominanceRules example 1 (Python window)

Demonstrates how to add a route dominance rule using the ConfigureRouteDominanceRules function in the Python window.

# 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 = ""

# Execute 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 example 2 (Python window)

Demonstrates how to update a route dominance rule using the ConfigureRouteDominanceRules function in the Python window.

# 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 = ""

# Execute 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 example 3 (stand-alone script)

Demonstrates how to delete a route dominance rule using the ConfigureRouteDominanceRules function in a stand-alone script.

# 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

# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# 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 = ""

# Execute 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)

# Check in licenses
arcpy.CheckInExtension('LocationReferencing')
ConfigureRouteDominanceRules example 4 (stand-alone script)

Demonstrates how to add a route dominance rule with exceptions using the ConfigureRouteDominanceRules function in a stand-alone script.

# 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

# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# 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"

# Execute 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)

# Check in licenses
arcpy.CheckInExtension('LocationReferencing')

环境

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

许可信息

  • Basic: 需要 ArcGIS Location Referencing
  • Standard: 需要 ArcGIS Location Referencing
  • Advanced: 需要 ArcGIS Location Referencing

相关主题