Output true route lines from a Location-allocation analysis
Last Published: April 25, 2020
Summary
The Location-allocation analysis only has two output options, Straight Line, or None. This workflow takes the straight line output and creates the true route.
Procedure
Run the location-allocation analysis of choice ensuring that there is a name field for the demand and facility points.
In the Table of Contents, right-click the lines generated from the location allocation, export them to a feature class, and add the data to the map.
Open the attribute table of the exported lines.
Add a new field called Demand and use the following Python syntax in the field calculator: a. If you used Facility to Demand: !Name!.partition(" - ")[2] b. If you used Demand to Facility: !Name!.partition(" - ")[0]
5. Add a new field called Facility and use the following Python syntax in the field calculator: a. If you used Facility to Demand: !Name!.partition(" - ")[0] b. If you used Demand to Facility: !Name!.partition(" - ")[2]
Run the Spatial Join tool using the following inputs:
a. Target Facilities = the point feature class called Facilities b. Join Features = The exported lines c. Join Operation = JOIN_ONE_TO_MANY d. Match Option = INTERSECT
Click the Network Analyst drop-down and select New Route.
In the Network Analyst window, right-click Stops > ‘Load Locations�’.
Select the Demand Points to ‘Load From:’ and populate ‘RouteName’ with the Name field used to load the demand points into the location allocation analysis > OK.
Right-click Stops and ‘Load Locations�’ again.
Select the output of the Spatial Join tool to ‘Load From:’ and for ‘Name’ select the field called Facility and for ‘RouteName’, select the field added called Demand > OK.
Solve the analysis, the routes are now exact.
Article ID: 000011873
Software:
ArcMap
Receive notifications and find solutions for new or common issues
Get summarized answers and video solutions from our new AI chatbot.