HOW TO

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



  1. Run the location-allocation analysis of choice ensuring that there is a name field for the demand and facility points.
    [O-Image]
  2. 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.
  3. Open the attribute table of the exported lines.
  4. 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. 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]
    [O-Image]
  6. Run the Spatial Join tool using the following inputs:
    [O-Image]
    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
    [O-Image]
  7. Click the Network Analyst drop-down and select New Route.
  8. In the Network Analyst window, right-click Stops > ‘Load Locations�’.
  9. 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.
    [O-Image]
  10. Right-click Stops and ‘Load Locations�’ again.
  11. 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.
    [O-Image]
  12. Solve the analysis, the routes are now exact.
    [O]

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.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options