Remove Overlapping Centerlines (Location Referencing)

Titleā€ƒ Remove Overlapping Centerlines (Location Referencing)

Summary

Removes overlapping centerline sections to ensure that there is one common centerline in cases where centerline geometry overlaps.

The ArcGIS Location Referencing minimum schema models route concurrencies by having routes share the same centerline associations in the centerline sequence table. Running this tool may result in centerline changes, such as centerline splitting or deletion of duplicated centerline features. It may also update centerline sequence table records so that routes share centerlines.

Overlapping centerlines can result when any of the following occur:

While the Remove Overlapping Centerlines tool can be run any time after a LRS Network is created and data is loaded, consider running it only after you've finished creating all LRS Networks and have loaded all data in your LRS. If additional columns are modeled on the centerlines, some centerline attributes may be lost when the tool is run.


Illustration


Centerline sequence records before and after Remove Overlapping Centerlines

Usage


Syntax

Parameter Explanation
in_centerline_features

An input layer or feature class representing an LRS centerline.

Code Samples

RemoveOverlappingCenterlines example 1 (Python window)

The following Python window script demonstrates how to use the RemoveOverlappingCenterlines function in immediate mode.


# Name: RemoveOverlappingCenterlines_inline.py
# Description: This script demonstrates how to use RemoveOverlappingCenterlines in immediate mode.
# Requires: ArcGIS Pipeline Referencing

# Tool variables 
in_centerline_features = "Centerline"

# Set current workspace
arcpy.env.workspace = "C:/data/Outputs.gdb"

# Execute the tool
arcpy.locref.RemoveOverlappingCenterlines(in_centerline_features)


                    

RemoveOverlappingCenterlines example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the RemoveOverlappingCenterlines function.


# Name: RemoveOverlappingCenterlines_standalone.py
# Description: This script demonstrates how to use RemoveOverlappingCenterlines in standalone mode.
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Set local variables
# input Centerline layer
in_centerline_features = "C:\\Data\Sample.gdb\\Centerline"

# Process: RemoveOverlappingCenterlines
arcpy.RemoveOverlappingCenterlines_locref(in_centerline_features)

                    

RemoveOverlappingCenterlines example 3 (stand-alone script)

The following stand-alone script demonstrates how to use RemoveOverlappingCenterlines in a feature service.


# Name: RemoveOverlappingCenterlines_Pro_Ex3.py
# Description: This script demonstrates how to use remove overlapping centerlines in stand alone mode using a feature service. It is recommended to work in a version and post it into the  default version.
# Requires: LocationReferencing license.

# Import arcpy module.
import arcpy

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


##Input centerline is in feature service.  Signing in portal is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

## Map the input centerline from the feature service. Here, 6 corresponds to the input centerline.
in_centerline_features  = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/6"


# Process: RemoveOverlappingCenterlines.
arcpy.RemoveOverlappingCenterlines_locref(in_centerline_features)

                    

Tags

Credits

Use limitations