## Analyzing the least-cost path

A least-cost path analysis uses a cost-weighted distance surface and a cost-weighted direction surface to create the smallest cost of travelling path from the source to the destination. The cost refers to one or more factors that could affect the travel. Cost factors, such as slopes or speed-restriction areas, define the cost surfaces. Those cost surfaces can be combined if the cost values use a common scale (for example, from value `1`

—best to value `10`

—worst). A least-cost path will follow the cells with the smallest accumulated cost.

In the *Analyzing surfaces* recipe, you studied the visibility between two geodetic points in order to plan some topographic surveys. Let's suppose you have two teams for this topographic survey campaign. Now, it is time to plan the trip from your office to the field. Your best routes will follow the roads with shallow slopes. The following model shows the workflow of the next spatial analysis: