Remove LRS Entity (Location Referencing)

摘要

Removes a linear referencing system (LRS) entity from an input geodatabase workspace.

使用情况

  • This tool performs a cascade delete of LRS entities to prevent any orphaned LRS Networks, LRS events, or LRS intersections. This means that removing an LRS will also unregister all LRS Networks that belong to it, as well as remove all LRS events and LRS intersections that belong to those LRS Networks. Similarly, removing an LRS Network will unregister all LRS events and LRS intersections that belong to that network.

  • The input workspace must contain an ArcGIS Location Referencing LRS.

  • This tool does not delete any feature classes, fields, or data. It updates internal metadata tables that store information about the LRS entities in the input geodatabase workspace.

  • Removing an LRS line network that has an LRS derived network registered will also remove the LRS derived network.

  • Removing an LRS event or LRS intersection will only unregister the selected LRS event or LRS intersection; it will not impact the parent LRS Network.

  • Removing a utility network feature class will only unregister it from the LRS. It does not delete the feature class from the database.

  • A list of the LRS entities that were removed is provided upon the successful completion of this tool.

  • The output of this tool is a modified geodatabase workspace.

参数

标注说明数据类型
LRS Workspace

The input geodatabase workspace that contains the LRS entity that will be removed.

Workspace
LRS Entity Type

Specifies the type of LRS entity that will be removed from the input geodatabase workspace.

  • LRSAn LRS and its dependent LRS Networks, as well as the LRS events, and LRS intersections registered to those LRS Networks, will be removed.
  • NetworkAn LRS Network and the LRS events and LRS intersections registered to that LRS Network will be removed.
  • EventAn LRS event will be removed.
  • IntersectionAn LRS intersection will be removed.
  • Utility Network Feature ClassA utility network feature class will be removed.
String
LRS Entity Name

The name of the LRS entity that will be removed from the input geodatabase workspace. The underlying feature classes and tables of the LRS entity will not be deleted.

String

派生输出

标注说明数据类型
Updated LRS Workspace

The output geodatabase workspace.

Workspace

arcpy.locref.RemoveLRSEntity(in_workspace, lrs_entity_type, lrs_entity_name)
名称说明数据类型
in_workspace

The input geodatabase workspace that contains the LRS entity that will be removed.

Workspace
lrs_entity_type

Specifies the type of LRS entity that will be removed from the input geodatabase workspace.

  • LRSAn LRS and its dependent LRS Networks, as well as the LRS events, and LRS intersections registered to those LRS Networks, will be removed.
  • NETWORKAn LRS Network and the LRS events and LRS intersections registered to that LRS Network will be removed.
  • EVENTAn LRS event will be removed.
  • INTERSECTIONAn LRS intersection will be removed.
  • UN_FEATURE_CLASSA utility network feature class will be removed.
String
lrs_entity_name

The name of the LRS entity that will be removed from the input geodatabase workspace. The underlying feature classes and tables of the LRS entity will not be deleted.

String

派生输出

名称说明数据类型
out_workspace

The output geodatabase workspace.

Workspace

代码示例

RemoveLRSEntity example 1 (Python window)

The following script demonstrates how to use the RemoveLRSEntity tool in the Python window.

# Name: RemoveLRSEntity_ex2.py
# Description: Unregister an LRS Line Network as well as the dependent LRS Derived Network and all LRS Events.
# Requires: ArcGIS Location Referencing

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

# Tool variables
in_workspace = r"C:\UPDM_Data\LRS\LRS.gdb"
lrs_entity_type = "NETWORK"
lrs_entity_name = "EngineeringNetwork"

# Set current workspace
arcpy.env.workspace = "C:\UPDM_Data\LRS.gdb"

# Execute the tool
arcpy.RemoveLRSEntity_locref(in_workspace, lrs_entity_type, lrs_entity_name)

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

The following script demonstrates how to use the RemoveLRSEntity tool in a stand-alone Python script.

# Name: RemoveLRSEntity_ex2.py
# Description: Unregister an LRS entity from a geodatabase workspace.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy
 
# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
Input_GDB = r"C:\UPDM_Data\LRS\LRS.gdb"
Entity_Type = "NETWORK"
Entity_Name = "EngineeringNetwork"

# Execute the tool
arcpy.RemoveLRSEntity_locref(Input_GDB, Entity_Type, Entity_Name)

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

环境

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

许可信息

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

相关主题