Hello! I need to find the roadway distance between 4 separate locations. I'm familiar with Network Analyst and am using OD Cost Matrix. If i have 4 records, I need the distance between 1-2, then 2-3, then 3-4, then 4-1. Does this make sense? So I need to act like I'm driving those distances, starting at 1, then going to each record, then ending back up at 1. Does anyone know how to do this? Is OD Cost matrix the best way,o or is closest facility better? Thanks in advance!
I just get distances from one point to all other points. I think my problem is the travelling salesman problem, but I only get one measurement instead of the distance from each location.
Route analysis is the right approach. Create the route, add the four stops. Solve. The output route only has the overall length of the route. Open up the attribute table for the Stops. it will have a field that has the cumulative length to each stop. You will need to subtract from the previous row to get the partial lengths. And it does not have the length back to 1 unless you have added it as the last stop.
Best way is to solve four routes, 1 to 2, then 2 to 3, then 3 to 4, and 4 to 1 and get the distances from the route attribute table. All these four solves can be done in the same on route layer by specifying a common ROUTENAME to each pair of stops.
Ahhhh - that is super helpful! I was able to do it - thanks!
Related question, if you know the answer. I have 7 polygon buffers, which points inside each buffer that needs to use the route tool. So I don't want it to cross the buffer line, I want to use the route tool for inside each buffer, but can I run the route tool only one time? I tried using polygon barriers, but it seemed to think inside the polygon was a barrier. Does my wording make sense?
You can convert the polygons to lines using the Feature To Line GP tool and then load them as line barriers. This will restrict the routes to be within that boundary.