Configure Lookup Table (Location Referencing)

Disponible avec la licence Location Referencing.

Résumé

Configures a lookup table for one or more fields used in a multifield route ID.

This tool can be run after Create LRS Network From Existing Dataset or Modify LRS Network for a multifield route ID.

Learn more about creating the LRS, networks, and events

A lookup table is an alternative to using coded value domains when a field that makes up a multifield route ID has several hundred or thousands of potential values, for example, a list of street names or a Geographic Names Information System (GNIS) code. The lookup table is used primarily when creating a route.

Utilisation

  • The lookup table can be configured with both the Lookup Key and Lookup Display parameter fields, allowing the user to search for a key value using its display value:

    • The Lookup Key field is the value that will be saved for the field in the multifield route ID.
    • The Lookup Display field is the value that appears in the text box for the multifield route ID.

  • The Field Applied To parameter drop-down menu will display only those fields that are part of a multifield route ID for the chosen LRS Network Feature Class.

    Remarque :

    The Lookup Key Field parameter value will be saved in the geodatabase as both a field and as part of the multifield route ID.

    The Lookup Key and Lookup Display fields can be the same or different fields in the lookup table.

    The Lookup Key parameter drop-down menu will display only those fields from the lookup table that have the same field type and a length less than or equal to the route field selected in the Field Applied To parameter drop-down menu.

  • The Lookup Display parameter value is optional. If you want to allow a value that is not in the lookup table, you cannot configure the Lookup Display parameter.

  • Location Referencing only reads the lookup table; it will not add records to the table. If the desired value is not present, you can add it to the lookup table using this tool.

  • If padding is configured for the field, it will be added if the Lookup Key field value is shorter than the field length.

  • Only one lookup table can be configured per LRS Network.

  • If the lookup table is in a multiuser geodatabase, the table should be nonversioned.

Syntaxe

arcpy.locref.ConfigureLookupTable(in_feature_class, lookup_table, field_applied_to, lookup_key, {lookup_display}, {allow_any_lookup_value})
ParamètreExplicationType de données
in_feature_class

The input LRS Network feature class in which the lookup table will be configured. The network must have a multifield route ID.

Feature Layer
lookup_table

A table that contains a list of street names and their corresponding GNIS codes. It can be a stand-alone table or reside in an SDE.

Table View
field_applied_to

The route ID field in the LRS Network in which the lookup_table will be configured.

String
lookup_key

The key field in the lookup_table.

String
lookup_display
(Facultatif)

The lookup_table description field. This field appears in the text box for the multifield route ID.

String
allow_any_lookup_value
(Facultatif)

Specifies whether a value that is not in the lookup table can be added. The lookup_display parameter cannot be configured when this option is checked.

  • DO_NOT_ALLOW_ANY_VALUEAllow a value to be configured when one is not present in the table.
  • ALLOW_ANY_VALUEDon't allow a lookup display value to be configured. This is the default.
Boolean

Sortie dérivée

NomExplicationType de données
out_feature_class

The updated route network feature class with Lookup Table configured.

Feature Layer

Exemple de code

ConfigureLookupTable example 1 (Python window)

Demonstrates how to use the ConfigureLookupTable tool in the Python window.

# Name: Configure_Lookup_Table.py
# Description: Configures a Lookup Table outside of database.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Tool variables
LRS_Network = r"C:\RH_Data.gdb\LRS\StateLog"
Table = r"C:\Data\cityCodeLookup.dbf"

# Execute the tool
arcpy.locref.ConfigureLookupTable(LRS_Network, Table, "CITY_CODE", "CODE", "DESC_LOOKU", "DO_NOT_ALLOW_ANY_VALUE")

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ConfigureLookupTable example 2 (stand-alone script)

Demonstrates how to use the ConfigureLookupTable tool as a stand-alone Python script.

# Name: Configure_Lookup_Table.py
# Description: Configures a Lookup Table present in the same database.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Set LRS network and table
LRS_Network = r"C:\RH_Data.gdb\LRS\StateLog"
Table = r"C:\RH_Data.gdb\cityCodeLookup"

# Execute the tool
arcpy.locref.ConfigureLookupTable(LRS_Network, Table, "CITY_CODE", "CODE", "DESC_LOOKU", "DO_NOT_ALLOW_ANY_VALUE")

print("Table configured successfully")

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

Informations de licence

  • Basic: Requiert ArcGIS Location Referencing
  • Standard: Requiert ArcGIS Location Referencing
  • Advanced: Requiert ArcGIS Location Referencing

Rubriques connexes