How to split an entire roadway network into segments of one mile length

08-07-2014 12:18 PM
New Contributor


I am working on Identification of Secondary crashes and proposed method is segment based. Following is the scenario:

1. The entire roadway network consists of several thousand links (which are polylines)

2. I used the Split tool under Editor to split a single link but Split command becomes grayed when when I do multiple selection.


I would appreciate any help on  this. Thanks !

Tags (1)
0 Kudos
5 Replies
Occasional Contributor III

One workflow might be to create station points along the line network at 1 mile intervals (using ETGeoTools free functions). That tools outputs the point locations which could then be used to Split Line by Point (Esri ArcCatalog tool). Probably a couple of other ways to tackle this as well, I'm sure the community will chip in, good luck!

MVP Honored Contributor

Arcpy implementation (then Split by Lines):

>>> fc = "YOUR_LAYER_NAME"
... points = []
... step = 2 # map units
... sr = arcpy.Describe(fc).spatialReference
... with arcpy.da.SearchCursor(fc,"SHAPE@", spatial_reference=sr) as cursor:
...    for row in cursor:
...        for i in range(int(row[0].length/step)):
...            point = row[0].positionAlongLine(i*step)
...            points.append(point)
... arcpy.CopyFeatures_management(points, r'in_memory\points')
MVP Legendary Contributor

This has been referenced several times with success... from Arcpy Cafe

EDITs ( by me.... thanks to Darren)

from that link

segmentAlongLine  ==>>  ArcMap  10.3 arcpy Polyline class, segmentAlongLine​

That Arcpy Café link, indicates, somewhat out of sight, and within the comments

Their edit 

EDIT: As was pointed out in the comments, the segmentAlongLine is new at 10.3.

Soooo it will or won't solve your problem, depending upon Arcmap version

0 Kudos
MVP Honored Contributor

Just a small nit-pick: the method in your link splits lines into x equal lengths, not segments of x length. Subtle difference, and I am sure it has been solved elsewhere, but not there.

New Contributor

Hey Darren, I need to split a road network into 100m segments. I encounter problems in the split because ArcGIS pro auto splits the network at nodes. Any chance you can offer some advice?




0 Kudos