描述
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.
语法
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.
| 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 |
代码示例
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')
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