Remove Overlapping Centerlines (Location Referencing)

Available with Location Referencing license.

Summary

Removes overlapping centerline sections to ensure that there is one common centerline when 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 may result when any of the following occur:

  • A network with concurrent routes is loaded
  • An additional network is loaded
  • Ad-hoc user centerline editing

Note:

While the Remove Overlapping Centerlines tool can be run any time after an 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 the LRS. If additional columns are modeled on the centerlines, some centerline attributes may be lost when the tool is run.

Illustration

Remove Overlapping Centerlines tool illustration
Centerlines C1 and C2 overlap until the middle of centerline C1. After running the Remove Overlapping Centerlines tool, the overlapping portion is removed, and centerline C3 is created and associated with routes R1 and R2 in the Centerline Sequence table.

Usage

Parameters

LabelExplanationData Type
Input Centerline Features

An input layer or feature class representing an LRS centerline.

Feature Layer

Derived Output

LabelExplanationData Type
Updated Centerline features

The updated centerline feature layer.

Feature Layer
Output Details File

A text file that details the overlapping centerlines removed from the feature layer.

Text File

arcpy.locref.RemoveOverlappingCenterlines(in_centerline_features)
NameExplanationData Type
in_centerline_features

An input layer or feature class representing an LRS centerline.

Feature Layer

Derived Output

NameExplanationData Type
updated_centerline_features

The updated centerline feature layer.

Feature Layer
out_details_file

A text file that details the overlapping centerlines removed from the feature layer.

Text File

Code sample

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: Remove overlapping centerlines in the Python window.
# Requires: ArcGIS Location 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: Remove overlapping centerlines in stand-alone mode.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

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

# Process: RemoveOverlappingCenterlines
arcpy.locref.RemoveOverlappingCenterlines(in_centerline_features)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
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: Remove overlapping centerlines in stand-alone mode using a feature service. It is recommended to work in a version and post it to the default version.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Input centerline is in feature service. Portal signin 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.locref.RemoveOverlappingCenterlines(in_centerline_features)

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

Environments

Special cases

Parallel Processing Factor

The default value for this environment, if left blank, is 0%. Any absolute value for the environment is always clamped between 0 and the number of logical cores in that machine.

Licensing information

  • Basic: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Standard: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Advanced: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)

Related topics