I have interstates and state owned roads as polyline spatial objects.(Source: https://www.fhwa.dot.gov/policyinformation/hpms/shapefiles.cfm )
I need to analyze a small segment of these roads. I have starting lat/lon and ending lat/lon for the segments. How do I break the above interstate or state roads in to segment polyline using start lat/lon, end lat/lon ?
Solved! Go to Solution.
assuming your table with start long/lat and end long/lat is structured in this way:
ID(roadName) StartX StartY EndX EndY *
1 -1.42875 54.33186 -1.371806 54.275749
and your start and end points exactly match the points in the polylines, I would use this approach.
1 - Split the polyline usign poly-split
2 - Join your table with the shape file based on the RoadName
3 - Using a multirow formula to flag the points beetween the start and the ending point
4 - Rebuild the Polyline excluding the not flagged points
Please find an example attached.
If your points do not exactly match with your polyline, I would use FindNearest tool to find the closest start and end point.
Let me know if the solution attached works for you, if not I will provide you another solution using the FindNearest tool