Hi,
I'm very much in need of a way to Split Lines at Points and save the direction of the original Line Feature, for example with attribute fields "FromPointID" and "ToPointID", or any other way. Because I need to do this for a huge amount of features, there is no way I could do this manually. I've been thinking of how to do this for quite a while, but couldn't figure out how to do it.
For example:
Take a Line Feature --- and it's their direction >
0--------------------------------------------------------->16 (Point ID 0 and 16 are known)
The Line Feature is intersected by Point IDs
0-------->11------>23---------->15---------->76--->16
What I need is to split the Line Feature 0--->16 it into 5 Line Features including the direction
0-------->11
11------>23
23---------->15
15---------->76
76--->16
Btw, what I'm trying to do is to create bi-directional flow maps for public transit with network analyst.
Best regards
Christian
Solved! Go to Solution.
Thank you very much! Actually, while I was trying your solution I got another idea and discovered a way which seems to work:
Split Lines at Points keeps the direction as far as I can see, and I can "output" the direction by calculating the coordinates of the start and endpoints of the Line features.
Are you referring to this tool?
Basically yes, but my problem is the following:
try a Near afterwards
It will bring over the coordinates and if memory serves, the ID of the points
Check the image on the link as well as the output parameters.
Spatial Join—Help | Documentation
is another one to look at.
Thanks for your replies!
I tried both Near and Spatial Join, however, both tools only joined one of the Point IDs instead of Start and End Point ID. Also, as far as I see, there is still no indication of the direction (moving towards or away from the joined Point ID)
In order to be clear what I want I created a graphic (sorry for my poor paint skills): My dataset has line features and point features. Then I have other Line Features (routes) overlaying the dataset, which I want to split along the points (grey) while extracting the direction (for example as "from Point ID" and "To Point ID")
Well nothing seems to be helping, so last stab...
Feature Vertices To Points—Data Management toolbox | Documentation
to get the vertices of your split polylines,
Then from there Near or spatial join to get the sequence of points.
This type of problem may be better suited to a coding solution based on a query of the points of the resultant split polylines. I have also not examined in any detail if splitting may result in segment orientation flipping. I have however, found some idiosyncracies associated with the generation of shapes from point sequences which raises that possibility.
Thank you very much! Actually, while I was trying your solution I got another idea and discovered a way which seems to work:
Split Lines at Points keeps the direction as far as I can see, and I can "output" the direction by calculating the coordinates of the start and endpoints of the Line features.