Tracking Creatures of Bavarian Folklore Using a Least-Cost Path Model

Table of Contents

  1. Tracking Creatures of Bavarian Folklore Using a Least-Cost Path Model
  2. Setting up Your Workspace
  3. Preparing the Data
  4. Skill Drill: Geocoding an Address and Creating a CSV Table to Import As XY Data
  5. Skill Drill: Defining the Study Area
  6. Skill Drill: Acquire Elevation Data from the USGS National Map Viewer
  7. Skill Drill: Acquire Land Cover Data from the USGS National Map Viewer
  8. Skill Drill: Acquire Hydrography Data from the USGS National Map Viewer
  9. Changing Global Environment Settings for Raster Processing
  10. Creating Cost Surface Models Using a Relative Cost Scale
  11. Creating a Remap Table to Reclassify Elevation
  12. Skill Drill: Creating a Remap Table to Reclassify Slope
  13. Skill Drill: Creating a Remap Table to Reclassify Tree Canopy Density
  14. Converting the Hydrography Features to Cost Surface Models
  15. Creating a Total Cost Surface Model
  16. Creating a Cost-Distance Surface Model
  17. Creating a Migration Corridor
  18. Determining the Least-Cost Path
  19. Skill Drill: Creating a Map of the Results

Determining the Least-Cost Path

Using the cost-distance surface model and the backlink raster, the GIS can find the least-cost path by starting at the destination cell and tracing a least-cost path back to the origin. As the least-cost path is generated, each cell along the path is assigned a value based on the cost units and are written onto a new raster layer. The process stops when it reaches the first backlink cell with a value of zero, the origin. The result is a raster layer modeling the least-cost path. In this step, you will determine the least-cost path for each of the individual den locations to the town of Orick. To prepare, you will have to separate each of the den locations so that they may be entered into the Cost Path tool, one at a time. There are several ways to do this, including selecting each den and creating new shapefiles. However, a very simple way is to use a Definition Query in the layer properties. Open the layer properties for the den locations layer and navigate to the Definition Query tab. Click on the Query Builder button. The Query Builder should look very familiar as it is nearly identical to the Select by Attribute tool. Create a query where the Den_ID is equal to the letter A. Then click OK and OK again to set the layer properties. On the map, you should see that the den locations layer only contains has den A. If you open the attribute table for the den locations layer, you will also see that it contains only one record for den A.  A Definition Query is a quick way to make a temporary change to a shapefile without altering the original data or creating new data. With this Definition Query in place, ArcMap will treat this shapefile as having only one point feature, den A.

An image of the Definition Query tab

In ArcMap, open the Cost Path tool. This tool can be found in the Distance toolbox under the Spatial Analyst Tools. Under Input raster or feature destination data, choose the den locations layer. Under the Input Cost distance raster load the Orick cost distance surface. Under the Input cost, backlink raster load the Orick backlink raster. For the Output raster, browse to your working folder and name the file Den_A_Least_Cost_Path.img. Leave all other settings as default and click OK.

An image of the Cost Path tool

The result will be a raster layer with the least-cost path from den A to the town of Orick. As you can see the least cost path is not always the shortest path. Open the attribute table for the den A least-cost path layer. In the attribute table, you will see a field called Value. A value of 1 is given to the cell that contains the source feature. The path with the lowest cost is given a value of 3. Under the PATHCOST field, the total cumulative relative cost is recorded. There are more values that can be assigned if there were multiple paths generated, but this is beyond the scope of this activity. Take a moment to record the total cost for this path. This is located under the PATHCOST field for the record that contains a 3 under the Value field.

An image of the least cost path
This least-cost path seems to reinforce the results of the migration corridor as the path seems to follow the areas colored white and light pink.

Open a blank Excel workbook and create a table recording the following results from your first least-cost path model.

  • The Den ID
  • The Path Cost

An example table is shown below.

Least-Cost Path Results
Den IDPath Cost
A ?????

Repeat the steps for each den, from B to J. Record the path cost for each.