Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Create sub segment from a polyline Spatial object using lat/lon

gnans19
11 - Bolide

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 ?

1 REPLY 1
mborriero
11 - Bolide

@gnans19

 

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

Labels