Multiple Routes from Attribute Table inputs

446
6
04-07-2021 12:02 PM
Labels (3)
David_Gardiner
New Contributor II

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?

0 Kudos
6 Replies
Robert_LeClair
Esri Frequent Contributor

I think what you're looking to accomplish is Hierarchy in network analysis that can be accomplished using the Network Analyst extension.

If you're new to Network Analyst, there are quite a few free tutorials here where you can learn about workflow in the extension.

0 Kudos
DavidPike
MVP Frequent Contributor

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

 

routeName

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.

 

0 Kudos
David_Gardiner
New Contributor II

Hi David

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.

Kind regards

Dave

0 Kudos
DavidPike
MVP Frequent Contributor

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.

 

0 Kudos
David_Gardiner
New Contributor II

My fault, I dragged in the wrong file. Try this one with 1 set of coords Reside x&y and the second coords x&y.

0 Kudos
DavidPike
MVP Frequent Contributor

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.

0 Kudos