Creating the least cost path

What is the least-cost path?

The Cost Path tool determines the least-cost path from a destination point to a source. Aside from requiring that the destination be specified, the Cost Path tool uses two rasters derived from a cost distance tool: the least-cost distance and back link raster. These rasters are created from the Cost Distance or Path Distance tools. The back link raster is used to retrace the least costly route from the destination to the source over the cost distance surface.

Why find the least-cost path?

The least-cost path travels from the destination to the source. This path is one cell wide, travels from the destination to the source, and is guaranteed to be the cheapest route relative to the cost units defined by the original cost raster that was input into the weighted-distance tool. Use the Cost Path tool to find the best route for a new road in terms of construction costs or to identify the path to take from several suburban locations (sources) to the closest shopping mall (destination). When applying the tool to a road construction example, the resulting path is the cheapest route for constructing a road from the destination to the source (the existing intersection).

Least-cost paths with two different weights
Least-cost paths with two different weights

You can see two potential paths for the new road in the diagram above (in purple and red). The purple line represents the path created using a cost raster in which each input raster (land use and slope) had the same influence. The red line represents the path created using a cost raster in which the slope input raster had a weight (influence) of 66 percent. By giving the slope input raster a higher weight, more attention was given to avoiding steeper slopes in the red path.

Creating the least-cost path

It is important to consider how to weight the rasters that make up the cost raster. How you weight your raster depends on your application and the results you want to achieve.

If there are multiple cells or zones as input destinations, the least-cost path can be calculated from each cell (resulting in multiple paths, one path for each cell), each zone (one path from each zone), or by layer (only one path, the cheapest from any zone). A parameter in the tool specifies which process should be utilized. In the following example, the Cost Path will be demonstrated by zone.

Distance path by zone

When there is a single least-cost path, it will be coded to the value three on the output raster. The cell within the source zone where the path originates is assigned the value one. In the following example, Cost Path will be demonstrated by layer.

Distance cost path by layer

When two or more cost paths from different zones converge on the way to a source and continue the remaining distance together, the joint path to the cell is assigned the value two, since the owner of the segment cannot be determined, as demonstrated in the example of Cost Path by zone below.

Distance path for multiple zones

The value assigned to each path is assigned by the order in which the zone cells are encountered in the scanning process.

Related Topics