Is it possible to transfer a direction of polylines to another set of polylines?

I have a road network with "oneway" column in it. I do a series of operations on the network in ModelBuilder to prepare it for further analysis with Network Analyst (I am using ArcGIS 10.4).

However the direction of polylines is messed up (particularly after using "Unsplit"--"Feature to Line" tools).

Can I somehow extract the directions of initial lines and transfer it to result lines?

I can not do this manually, because the network is pretty large.

Maybe extract start-end points first, but how can I assign them to polylines as direction?

On the picture below: the red arrow is the original direction, the black arrow direction I get after using some tools in ModelBuilder.

enter image description here


You can flip the direction of any line in Editor:

  • Start editing
  • Select the line
  • Click the edit vertices tool
  • Line will go into edit vertices mode (with nodes)
  • Right click on line -> shortcut menu appears -> select "Flip"

With ArcObjects and the SDK for Visual Studio you can build all sorts of tools with custom behaviour that will work with the basic license but it requires some programming experience. I wrote a few tools for changing directions and working with lines in general (change direction of selected lines to a specific compass direction, flip direction of all selected lines, split selected lines with other lines, etc. but don't have one you are needing.)

Although I do have some tools online for free download I haven't made any of these available but I think the one for flipping directions could work for you because it will flip all selected lines at once. Just recompiled everything to 10.6 so if you have 10.6 and want to try it out email me and I will send you the addin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.