Geography Reference
In-Depth Information
Click OK to generate the new dataset called CostDir_Deg. It should be at the top of the T/C
under Square_Grid. Turn all other layers off. Use CellTool to fill up the raster with arrows. Verify
that to head toward a the source cell at (15,15) from cell (85,15), you would first go to cell
(75,5). That is, cell (85,15) will have the value 225, indicating a direction of southwest. Trace
the rest of the path from cell (85,15). Notice how it takes a southern route and then turns
northwest again, despite the fact that the shortest distance (the straight-line distance) is due
west. Why is this?
______________________________________________________.
Calculating a Least-Cost Path from “A” to “B”
In the following steps, you will find the least-cost path between a starting cell and a destination cell.
You have probably noticed that you could figure out the least-cost path by investigating the direction
raster. If so, you will have certainly noticed that doing so was a total nuisance. In the next steps you will
generate a polyline featureclass that will show you the least-cost path from a given, specified cell to a
“source” cell.
The software can handle multiple cells in both the starting raster and the destination raster, but this
exercise will demonstrate the request using only one cell in each. If it has not become clear by this point,
I should state the obvious: The cost (and/or the path) of going from A to B, as calculated by the raster
manipulations you have been directing, is the same as the cost (and/or the path) of going from B to A.
There are certainly instances in which this assumption is not warranted. One example would be if A is at
the bottom of a mountain and B is at the top. Another example is driving in a city that has one-way streets.
But the tool can be useful anyway.
The goal of this exercise is to use Shortest Path to create a polyline that shows the least-cost path
between the single cell in a raster called Single_cell and the cell in the raster Onecell. You could, of
course, determine this path by exploring the destination raster, but instead we will generates a raster
based on least cost, then create a polyline with the path delineated.
38. Find and run the Cost Allocation tool. Make Onecell the Input raster. The Source field should
be Value. Tolls is the Input cost raster. Name the Output allocation raster Onecell_allo. Call the
Output distance raster” Onecell_dis. Call the “Output direction raster” Onecell_dir.
39. Find and run the Cost Path tool. You want the least cost path from Single_cell so that becomes
the Input raster. The “Input cost distance raster” is Onecell_Dis. The “Input cost backlink
raster” is Onecell_Dir. Call the output raster Cost_Path_from_Single_Cell. Click OK. This should
put Cost_Path_from_Single_cell at the top of the T/C and turned on. Rearrange the layers in the
T/C: Put Onecell and Single_cell just below Square_grid. Cost_Path_from_Single_Cell should be
next. Turn everything else off and, to reduce clutter, collapse the legends of all the layers that
are turned off.
What you are seeing now is a raster of cells that indicate the least cost path for getting from
the cell at (95,75 - called Single_cell) to the cell at (15,15—called Onecell), taking into
account the cost surface Tolls. It is, of course, the cost surface that is forcing the least cost
path to not be a diagonal set of cells following an almost straight line, but rather a path that
goes south, then southwest, and then west—because this is the cheapest way to go. We can
make a vector representation of this path easily.
 
Search WWH ::




Custom Search