Generating multiple routes

03-09-2014 05:24 PM
New Contributor
I have a shapefile "ElementaryStudents" which has around 40,000 records in it. I also have a shapefile "ElementarySchools" which has 66 records in it. I want Network Analyst to calculate all of the routes from each student's residence to their school so that I can find the median distance for all students at each school. I have tried to do the field mapping and it wants to make each student's residence a stop on a route for all students assigned to a school.  So, I end up with hundreds of stops for each school. I only want two stops. Student's residence as stop one and the assigned school as stop two. The result would have the number of routes equal to the number of elementary students.

I apologize if this is a redundant question, but I can't find a solution. I have tried so many combinations of field maps with no success.
Tags (2)
0 Kudos
3 Replies
Occasional Contributor III

You must you the OD matrix tool. with student location as origin and school as destination. You will get what you need. Of course later you will have to do little math on the result to get means.

0 Kudos
New Contributor
Thank you for your response. It seems that there must be a way to accomplish this via the route network. I will dig deeper to see if there is some kind of "back-door" solution.
0 Kudos
Esri Regular Contributor
You CAN use the Route tool to do this.  Use the RouteName field in field mapping.  You will need a separate, unique RouteName for each student, and you will need a separate copy of the student's school for each student that has the RouteName assigned to it.  Naturally, this significantly increases the size of your input data.  With so many students, you'll probably want to break it up into chunks.  You can automate your workflow using python or ModelBuilder if you don't want to run each chunk manually.

See this thread for more detailed information:
0 Kudos