Use the cost distance tool to create cost distance and backlink rasters
Segment 30 of 34
|Top Previous Next|
You will now run the Cost Distance tool using the cost dataset you just created (which identifies the cost of traveling through each cell) and the final_site layer (the source) you created in exercise 2. The outputs from this tool are a distance dataset in which each cell contains a value representing the accumulated least cost of traveling from that cell to the source and a backlink dataset that gives the direction of the least costly path from each cell back to the source.
To do so, expand the Distance toolset in the Spatial Analyst Tools toolbox, click and drag the Cost Distance tool onto the ModelBuilder window, right-click the Cost Distance tool element and click Open. Click the Input raster or feature source data drop-down arrow and click the final_site layer.
Click the Input cost raster drop-down arrow and click the Cost surface variable (the output from the Weighted Overlay tool).
Accept the default path for the Output distance raster, but change the name to “cost_dist”.
Type “C:\Spatial\Results” (or an alternative drive) for the path of the Output backlink raster parameter, and type “cost_bklink” for the name of the output. 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_dist derived data element and click Rename. Type “Output cost distance” and click OK. Right-click the Output cost distance derived data element and click Add To Display.
Right-click the cost_bklink derived data element and click Rename. Type “Output cost backlink” and click OK. Right-click the Output cost backlink derived data element and click Add To Display.
Right-click the Cost Distance tool element and click Run to run the process.
Examine the layers added to your ArcMap display. The cost distance layer (cost_dist) displays the accumulated cost of traveling from any location (or cell) to the source (the school site). It does not contain information on which way to travel from a particular cell to the source, just how much it will cost to get there, following the least costly path. The cost backlink layer (cost_bklink) shows which way to travel from any cell, following the least costly path back to the source.