Split Line At Point (Data Management)
Summary
Splits line features based on intersection or proximity to point features.
Usage
-
Input Features must be lines.
-
If Search Distance (search_radius) is unspecified, a nearest point will be used to split the line feature.
Syntax
SplitLineAtPoint_management (in_features, point_features, out_feature_class, {search_radius})
Parameter | Explanation | Data Type |
in_features |
The input line features to be split. | Feature Layer |
point_features |
The input point features whose locations will be used to split the input lines. | Feature Layer |
out_feature_class |
The new feature class that will be created containing the split lines. | Feature Class |
search_radius (Optional) |
Used to split lines by their proximity to point features. Points within the search distance to an input line will be used to split those lines at the nearest location to the point along the line segment. | Linear Unit |
Code Sample
SplitLineAtPoint Example(stand-alone script)
This example shows how to use a Python script to run SplitLineAtPoint.
#Name: SplitLineAtPoint_Example.py
# Description: split line features based upon near point features; Search Distance is in linear
# unit meters
# Requirements:
# Author: ESRI
import arcpy
from arcpy import env
env.workspace="C:/data"
inFeatures="streets.shp"
pointFeatures="events.shp"
outFeatureclass="splitline_out.shp"
searchRadius= "20 Meters"
try:
arcpy.SplitLineAtPoint_management(inFeatures, pointFeatures, outFeatureclass, searchRadius)
except Exception, e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()[2]
print "Line %i" % tb.tb_lineno
print e.message
SplitLineAtPoint Example (Python window)
This example shows how to run SplitLineAtPoint tool in a Python window.
import arcpy
from arcpy import env
env.workspace="C:/data"
arcpy.SplitLineAtPoint_management("streets.shp","events.shp","splitline_out.shp","20 Meters")
Environments
Related Topics
Licensing Information
ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Yes
11/18/2013