Insert Vertex into Line Given Point

7523
5
Jump to solution
03-18-2015 12:38 PM
BenGrod
Occasional Contributor III

Does anyone know of a tool or script which will insert a vertex into a line feature class given a point feature class? My scenario is that I am appending new data to an existing network (Network Analyst/Dataset). One of the properties of my network is that where lines intersect, there must be a junction point, and all of the lines which take place in the intersection must have a vertex coincident with the junction point. I have the junctions as points and I have the lines but I don't have a method for inserting a vertex in a line given a point.

I attempted Split Line by Point but because it is a network it ruins the attribute properties of that line segment. For instance the line segment was 200 meters but after split it was two 100 meter segments with the original 200 meter attribute and a number of other cascading attribute issues. I would ideally like to keep the original line segment and only add new vertices. Any help is appreciated.

0 Kudos
1 Solution

Accepted Solutions
IanMurray
Frequent Contributor

Oddly enough, that question got brought up to since the person who asked the original question, since that was like for you, a good but not perfect solution.  So there happened to be a follow-up post found here

That may fix the issue your brought up.

View solution in original post

5 Replies
IanMurray
Frequent Contributor

This exact question has been asked on stack exchange, you may to try their idea of using topology.

BenGrod
Occasional Contributor III

Ian, thank you for the helpful reply. Though, the method suggested on stack exchange doesn't align exactly with my final product. I'll test it out but it appears that it will place vertices at every line intersection. I do want vertices at line intersections but not all line intersection, for instance lines cross each other at overpasses. Thanks again and hopefully the topology rules have a viable solution.

0 Kudos
IanMurray
Frequent Contributor

Oddly enough, that question got brought up to since the person who asked the original question, since that was like for you, a good but not perfect solution.  So there happened to be a follow-up post found here

That may fix the issue your brought up.

BenGrod
Occasional Contributor III

Thanks again Ian, looks like I'm doing the exact same thing as this Jason Miller on GIS Stack Exchange

0 Kudos
IanMurray
Frequent Contributor

Welcome though I am curious if someone could come up with a more elegant way to manage this process.  Maybe generating the near table from the feature to vertices to determine the closest coordinate, using those coordinates then inserting new x,y coordinate of the point into the line segments geometry using an Update Cursor based on the nearest vertex in the near table.  No time for me to experiment today, but maybe some other time.