ArcGIS banner

Use the cost path tool to find the least cost path between to points

Spatial Analyst

Segment 31 of 34

Top  Previous  Next

The new road will redirect much of the traffic away from the existing road to the school and provide a back route for school buses and other vehicles.

Examine the destination layer in the table of contents of your ArcMap session. This is the starting point for the new road to the school site. In the Spatial Analyst Tools toolbox, expand the Distance toolset. Click and drag the Cost Path tool onto the ModelBuilder window. Right-click the Cost Path tool element and click Open.

Click the Input raster or feature destination data drop-down arrow and click the destination layer.

Click the Input cost distance raster drop-down arrow and click the Output cost distance variable (one of the outputs from the Cost Distance tool).

Click the Input cost backlink raster drop-down arrow and click the Output Cost Backlink variable (one of the outputs from the Cost Distance tool).

Accept the default path for the Output raster parameter, but change the name to “cost_path”.

When the input feature destination data is processed, it will be converted temporarily to a grid as part of the processing. There will only be one cell in this grid, because there is only one destination point. The value for the Path type parameter can be left as EACH_CELL. Only one path will be created, since there is only one cell. Click OK.

Click the Auto Layout button, then click the Full Extent button to apply the current diagram properties to the elements and place them within the display window.

Right-click the cost_path derived data element and click Rename. Type “Output cost path” and click OK. Right-click the Output cost path derived data element and click Add To Display.

Right-click the Cost Path tool element and click Run to run the process.

Examine the layer added to your ArcMap display. The Output cost path layer represents the least costly path from the school site to the destination point. It avoids steep slopes and certain land-use types that are considered costlier for constructing the road.


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.