Select to view content in your preferred language

Split line at each intersection

4433
5
02-07-2011 10:37 PM
RobinWilson
Emerging Contributor
Hi,

Is there a way, in Python using ArcPy, to split a line at the intersections with the other lines. That is, if I have a long line which intersects many other lines, I'd like to split the long line into a number of shorter lines - split at the intersections.

Is this possible?

Cheers,

Robin
Tags (2)
0 Kudos
5 Replies
NiklasNorrthon
Frequent Contributor
If you have access to ArcInfo there are tools that do exactly that. See Identity or Update for example.

If not, maybe the Intersect tool and some coding could work.
0 Kudos
RobinWilson
Emerging Contributor
Hi,

Thanks for the very prompt reply! However, I can't quite see how to use those tools to do what I want. The Identity and Update tools state in the help that they require at least one of the inputs to be a polygon, and sadly all of my inputs are polylines. Do you have any ideas how to get around this?

It looks like I might be able to use the Intersect tool to create points at the intersections, and then join those up with new lines...maybe. Any further ideas?

Cheers,

Robin
0 Kudos
NiklasNorrthon
Frequent Contributor
Identity works with lines, just tried it, and it seems it adds vertexes at the intersections, but it doesn't split the line. Do some exerimenting and you might find a solution there. Split Line At Vertexes tool might be useful too...
0 Kudos
NiklasNorrthon
Frequent Contributor
Intersection, with output type set to point, followed by Split Line At Points (with a reasonable tolerance) will solve your problem.
0 Kudos
ChrisSnyder
Honored Contributor
The FeatureToLine tool is another way to do it.