I wanting to create and display multiple driving routes calculated from two sets of coordinates (Start & Stop) that exist from within the same attribute table. I suppose its much like a batch process, taking each set of coordinates, calculating the route distance, display and then move onto the coordinates in the next row until there are no rows left. I'm looking to have a mass of routes cobwebbed in the display so that I can analyze fro crossing patterns.
Can this be done somehow please?
In your stops you can assign a routeName attribute to do this
see the explanation in the Stops parameter - Find Routes (Ready To Use)—ArcGIS Pro | Documentation
a freindlier explanation - Route analysis layer—ArcGIS Pro | Documentation
This represents the name of the route to which the stop belongs. Stops with the same RouteName value are grouped together.
Using this field, you can group stops into different routes, and the output attempts to generate one route for each group of stops.
If some stops have route names, they are grouped into a route with the same name. If some stops have RouteName values and others do not, those without route names are listed as unassigned in the results and are left out of the solution.
If none of the stops have a RouteName value, all the stops belong to the same route and one route is generated.
Thank you so much for your help. Are you able to add further please?
Is this a Tool that can be run or is it run by code?
I have attached an excel file that shows the attributes assigned to a feature. How do I structure Route Analysis Layer functionality to see Field = ObjectID as the RouteName and it has a Stop at Fields = Reside x and Reside y and a second stop at Field = x and y. Then how do I run the functionality as a batch that processes down the ObjectID column in the attribute table?
Hope you can help me.
Well you'd first need to create a feature class from your spreadsheet using the Latitude and Longitude values.
Create points from a table—ArcGIS Pro | Documentation
You've also mentioned Reside fields which I cant see in the XLS. This is pretty confusing.
If you used objectID as RouteName you'd only have one stop per route surely which wouldn't make any sense.
I kind-of get it, reside would be a single origin stop, then the other xy field would be the final destination stop? i.e. 2 points per route.
Any Stop location for the Routing tool is derived from the geometry of each row/feature in the feature class rather than an xy field or fields.
The way your data is structured makes this slightly more difficult as the csv would have to be manipulated to have a row of origin stop with route ID 1, and another row for destination stop with route ID 1.
It's fairly easy with python but considering the very small number of routes you have, it can be done manually pretty fast. Do this manipulation in the CSV then re-add as table to xy via the single lat long entries.