# 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')