Hi,
I have two point layers, origination, and the destination. I want to calculate the travel distance and time between each origin and destination point. For example, here is the dataset:
Origin Destination
1 X
2 Y
3
And eventually, there will be 6 routes, 1X, 2X, 3X, 1Y, 2Y and 3Y. How should I do that in the network analysis or in ArcGIS?
Use the OD Cost Matrix Analysis. You can load your Origins and Destinations and it will solve all N by M routes and return the travel distance/cost. You can look at the tutorial here:
Jay Sandhu
Thank you Jay, the OD cost matrix is calculating every possible route.
I have one further question, unlike what I used to see in Network Analysis, the routes from the OD cost matrix are straight lines but not the drive paths. Am I doing it wrong?
I think you should be able to use Network Analyst and have multiple destinations/origins. Both inputs need to have a field to join by in order for it to evaluate all routes possible. I did this in AGOL as well.
The OD Cost Matrix does not return the shape of the path travelled. This is because it can take longer to compute for very large values of Origins and Destinations. The OD solver is designed for the case when you only need the shortest travel distance/cost and not the route geometry. Straight lines are returned between each origin/destination pair for convenience to identify the pair.
If you also want to get the actual route geometry then use the Closest Facility Solver. Load your origins as Incidents and your Destinations as Facilities. Set the CF solver to solve for the number of Destinations/Facilities that you have. When you solve this CF layer you will also get the paths travelled.
Jay Sandhu
I have a fairly large set of Origins and Destinations and am working on ways to improve the run times in python? Any suggestions?
This GitHub repo may be helpful to you: https://github.com/Esri/large-network-analysis-tools. You might be able to use the tools provided there out of the box. If you need to update or write code yourself, this DevSummit presentation may be helpful: https://mediaspace.esri.com/media/t/1_hzppnv8p
By chance is there anywhere I can find an example where this was used on a large number of Origins and Destinations just to find the Drive Time and Distance. I did really enjoyed the videos, but am still a bit unsure of how to actually apply the methods.
You should just be able to download the toolbox from https://github.com/Esri/large-network-analysis-tools and use it as is, I think.