Desire lines are rays connecting a site to associated location points. The Generate Desire Lines tool outputs straight lines that show the connection between sites and their associated location points. The output attribute table from the analysis represents the actual route measures (travel times or travel distances) of the best shortest path on the street network for each site/location point pair.
The Generate Desire Lines tool depends on two parameters: Store Layer and Customer Layer. Before the analysis can be run, you must associate the input stores with their customers. Create a unique Store ID for each store, and then select this ID in the Associated Store ID field of your customer layer.
Once the stores are matched to their customers, you can specify additional parameters. The Distance Type parameter is essential and is dependent on the analysis you want to carry out. All distance types use the street network dataset for calculations, except for Straight Line distance (the default distance type).
Network datasets
ArcGIS Business Analyst geoprocessing tools with distance parameters use the street network dataset to perform various analyses. A street network dataset is an intelligent model of the road system. It contains not only the location and attributes of roads but also information about how roads relate to one another, such as which roads are connected, which turns between connected roads are allowed or prohibited, and other information that affects what travel paths are possible and how long travel takes. The Generate Desire Lines solver references the network dataset to determine the nearby location points.
Algorithm details
The Generate Desire Lines tool uses a multiple-origin, multiple-destination algorithm based on Dijkstra's algorithm. It has the option to only compute the shortest paths if they are within a specified cutoff. The solver does not calculate the shape of the resulting shortest path and only returns straight lines from origin to destination for less overhead and faster performance. To use Dijkstra's algorithm in the context of real-world transportation data, this algorithm considers network datasets that store information such as one-way restrictions, turn restrictions, junction impedance, barriers, and side-of-street constraints.
As mentioned previously, the two main parameters in the analysis are the inputs: Store Layer and Customer Layer. The other component that is important in the analysis, when using a distance type other than straight line, is the network dataset. Generate Desire Lines can intelligently make use of the ArcGIS Online network dataset or the local Business Analyst network dataset, depending on which data source Business Analyst is set to.
Example tool workflow
Consider an analysis where an antique store owner is trying to better understand the distribution of customers who regularly shop at the store's two locations in Los Angeles County. The store owner wants to assess where the customers are driving from and how many customers are within 15 minutes of the antique stores.
Associate each antique store with its regular customers
The association between the antique stores and their customers is made using the Unique Store ID field from the antique stores layer and the associated Store ID field from the customer layer. The final geometry output shows rays from each antique store to its respective customers.
Locate the antique stores and customers on the nearest street segment
The second step in the analysis is to place the stores and the customers on the nearest street segments. This is an important step to get accurate results based on the network dataset. The store and customer points need to be snapped onto the streets that make up the network dataset. The algorithm will then solve for the shortest path between the antique store and its customers.
Solve for the store and each customer individually
Once the antique stores and their customers are located on the network and are also associated with each other, the algorithm solves for each store and its individual customers, respectively. To find the shortest path from a store location to a customer location, Dijkstra's algorithm maintains a set of junctions, whose final shortest path from the store has already been computed. The algorithm repeatedly finds a junction that has the minimum shortest-path estimate, adds it to the set of junctions previously calculated, and updates the shortest-path estimates. The algorithm continues until it returns the shortest path between the store and the customer location. The process is carried out for all customer points and the associated stores.
The following illustration shows how the algorithm only considers street segments (blue dots) that lead to the shortest path and ignores all other streets until it reaches the destination.
Nota:
The geometry output of desire lines is not along the actual route; the algorithm returns straight lines with route measures, which are appended to the attribute table. The illustration is provided as a simplified representation of this process.
Use a cutoff
The store owner is only trying to understand the distribution of his customers within a 15-minute drive from the antique stores, so you need to specify a cutoff in the analysis. The algorithm will similarly solve between starting and destination locations. However, the analysis only proceeds until the 15-minute cutoff is reached. All junctions that are outside the cutoff value will not be considered in the analysis.
Write the results into the attribute table
In the output attribute table, examine two key output fields. These fields are determined by the Distance Type and Measure Units parameters. The Measure Units parameter is further dependent on the Distance Type parameter. For example, Measure Units is set to Minutes by default, if Distance Type is set to Driving Time. Depending on the distance type and the measure units specified in the tool, the measures of the output along the shortest path are appended into the attribute table. The other attributes in the output table are from the input store and customer layers.
In this example, Distance Type is set to Driving Time and Measure Units is set to Minutes. Therefore, the output attribute table contains the following fields:
Draw desire lines that connect each store with its customers
As mentioned previously, the algorithm solver calculates, but does not display, the shape of the resulting shortest path. The algorithm only returns straight lines from origin to destination for faster performance and a clearer visual.
The image below shows the output from the Generate Desire Lines tool. The rays connect to customers who are within a cutoff of 15 minutes from the antique store. Customers that are not connected to the antique stores are those who lie outside the cutoff.
Interpret the Wind Rose report
The Generate Desire Lines tool allows you to generate a Wind Rose report, which facilitates a better understanding of your customer distribution. It summarizes the information in the output attribute table and highlights some key facts about the distribution of your location points.
Read how to interpret a Wind Rose report.