Network Analyst Flip Line direction by Order Sequence

194
13
04-16-2018 08:06 AM
Highlighted
New Contributor III

I want to flip all route lines according to the orders sequence numbers.

I would then show arrows with the correct direction of travel.

I tried using the Sort tool to resort records according to the sequence number.  I must be mistaken that it does not resort/flip the lines and direction.

Is there a possible way to accomplish what I am attempting to do ?

Thank You.

Tags (4)
Reply
0 Kudos
13 Replies
Highlighted
MVP Esteemed Contributor

What did you sort on? Sorting on the geometry won't flip lines.  

Flip does is you have an advanced or standard licence http://pro.arcgis.com/en/pro-app/tool-reference/editing/flip-line.htm

Highlighted
New Contributor III

I am using ArcMap and have advanced license, manual flipping one by one works fine.

I sorted on sequence numbers I obtained from routing orders.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

sorting on sequence numbers will just sort on those numbers, but as you well know, it does nothing to the geometry

Highlighted
New Contributor III

Thanks for the feedback, I will have to take another approach.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Flip is the way to go as Dan already mentioned. Just some side notes:

  • The tool will modify the input featureclass (so perhaps use a copy to test it on)
  • It works with selections. If you can select all the elements that need to be flipped, the tool will only change those.
Reply
0 Kudos
Highlighted
New Contributor III

I agree and have performed these steps for flipping a line, it is not a practical solution for every line.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

An alternative then is to use the reversed arrow symbology... it will draw in the opposite direction to that in which it was digitized.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

I was referring to creating a selection of all the features that require flipping and apply the tool once to flip all those features. In case you can't use the attributes to define that selection, probably a bit of code could do the trick. I have done similar things in the past. Can you share a small part of your data and indicate which attribute you use to define the order of the segments?

Reply
0 Kudos
Highlighted
Esri Regular Contributor

>I want to flip all route lines according to the orders sequence numbers.

The output route from a route or VRP is a single feature class (per route) and it is already oriented in the direction of the orders sequence numbers. I do not understand your use case to "flip" these.

Jay Sandhu