Select to view content in your preferred language

Network Analyst Directions

2076
6
03-28-2018 12:28 PM
Walker_Max
Occasional Contributor

I am using the Network Analyst‌ extension to find routes for truck permitting. We recently upgraded our network dataset versions to 10.2 and I noticed some changes in the directions. The change that is causing an issue for me is when there are two turns in close proximity. The directions return something like "Turn left on |EDISON ST (Local-GALLATIN) (Class 0)| and immediately turn left on |IL-13 (State) (Class 2)|". The issue is that it ties two different road segments together under one line of directions. This results in the mileage being combined for those two different road features. For our routing application, we need these two roadways separated for mileage calculation (State vs Local). We also wrap the local roadways with a green band in our application so customers know which local sections of their route they need to get local permits for. This is much more difficult with two different classifications of roadway segments sharing the same line of directions. 

I have tried changing the Road Class Integer Descriptor to classify State and Local roadways different but the "immediately turn.." still occurred. Does anyone have any ideas on what I can change to get the directions to read each change in street name or direction as its own line? 

The images attached show how the two different jurisdictions of roadways are combined into one line of directions (which I need broken up). As you can see, the mileage is combined for that line of directions. So even though .1 miles might be local and the other .3 is state, it only results in .4 Mi. 

Thanks! 

Max 

0 Kudos
6 Replies
MelindaMorang
Esri Regular Contributor

Are you trying to calculate the mileage of the different street types based on the directions text?  If so, here are two alternative, easier/better ways to calculate your mileage.

1. Use the Copy Traversed Source Features tool after solving your route.  This tool will output a feature class of the network edges (the individual street segments) that were traversed by the route.  From that information, you can calculate the number of miles of each type of street that was used.

2. You can create some additional cost attributes on your network dataset and then "accumulate" these attributes along with solving the route.  So, suppose you have two road classes, State and Local.  Create two cost attributes, "StateMiles" and "LocalMiles".  For "StateMiles", configure the evaluators such that the attribute gives you the road length for all state roads and 0 for all other roads.  Do a similar thing for "LocalMiles".  Then, when you solve your route, use the Accumulate Attributes section to accumulate StateMiles and LocalMiles.  When the route solve is done, the attribute table should show you Total_StateMiles and Total_LocalMiles, which is the total number of miles of each of those road classes that was traversed.  Please ask further questions about this if you are uncertain of how to create cost attributes and configure evaluators.

0 Kudos
Walker_Max
Occasional Contributor

I am more so looking for a way to break up lines of directions like "and immediately turn left on". We currently wrap all local road sections of the route with a green band. This shows customers which sections they need to get local permission for. If we do a jurisdiction check on the first part of that string, "Turn left on |EDISON ST (Local-GALLATIN) (Class 0)| and immediately turn left on |IL-13 (State) (Class 2)|", we are assigning that whole stretch of the route local jurisdiction. When in actuality it is only the first .1 miles of the 4 mile section identified by that line of directions. Even if we check the second end of the directions string for "State", we are then assigning the .1 mi of local roadway state jurisdiction.

We solve routes and issue permits directly after a route is solved. I am concerned that the first option would add a lot of time to the route solve process and not really solve our issue. 

The second option would generate an accurate mileage value for State vs Local roadways, but I don't think it will alter the directions or the issue of assigning the green band to local roadway edges. 

I'll attempt the second option and see if we can figure out a different method of assigning the green band on the local edges. 

Thanks!

Max 

0 Kudos
MelindaMorang
Esri Regular Contributor

I'm still trying to understand what your ultimate goal is.  So...you want to have printed/text directions and to highlight the maneuvers that are associated with areas requiring some kind of local permits?  Do you specifically need this information in the directions text and not on the map or in the map features?

0 Kudos
Walker_Max
Occasional Contributor

Our end goal is to have all turns in the route have their own line of direction, instead of the combined example. 

0 Kudos
Walker_Max
Occasional Contributor

I was able to edit a value in the directions.xml located in the network analyst folder under program files to get the directions to read as I wanted. 

C:\Program Files (x86)\ArcGIS\Desktop10.2\NetworkAnalyst\Directions


<!-- Complex turn recognizer-->
<Recognizer id="ComplexTurn" type="eRTComplex" >
<Rule>@Intersection And @TurnAzimuth</Rule>
<Param name="DistanceThreshold" value="0.04"/>
<Param name="Origin" value="SecondSimpleTurn"/>
</Recognizer>

I changed the distance threshold value to 0 instead of 0.04. 

ArjunDongre
Regular Contributor

Had this exact same problem, thanks for the help!

0 Kudos