Route segments in due order.

03-18-2014 01:01 PM
New Contributor
Hi everybody. Thank you for taking the time in reading this post.

I have some thousands of origins and destinations that I loaded into ArcMap and managed to calculated the shortest path for each pair of ODs.

I would like to be able to export, for each route, the segments in the network dataset that it crosses by ID. E.g., if a route started in segment 1, then would go over segment 3 and it finished within segment 10:

Route ID |  Segment 1 |  Segment 2 |   Segment 3     ...
Route 1  |       1          |     3          |     10          ...

I've seen several posts about extrapolating the segments used in a route, but not considering the order in which they are crossed. Does anybody have any suggestion on how to do this?
Tags (2)
0 Kudos
2 Replies
Esri Regular Contributor
The GP tool CopytraversedSourceFeatures will create a line feature class with the segments in order they were traversed in the shortest route. However this does not work with the OD Cost Matrix solver layer as the OD layer does not retain this information. However you can use the Closest Facility layer, load your Origins as Incidents and the Destinations as Facilities, set the number of facilities to find to the maximum number of facilities you have and solve. This will solve the complete N by M matrix of routes and also generate the paths and then the CopytraversedSourceFeatures tool will create the segment table you need. Try it with a small subset to make sure you understand how the process works. Tool help below:

Jay Sandhu
0 Kudos
New Contributor
Thank you very much Jay Sandhu...twice!

First, I would never guess that such feature was already built-in.

Secondly, instead of using the Closest Facility layer I took another suggestion of yours in an old 2008 post: to use the Route layer loading departures and stops with the same route ID. That one suits my problem better.

Have a great day!

0 Kudos