Least Cost Path
Least Cost Path
The primary goal of this and the next exercise is to find the least-cost path for a proposed power
transmission line between a fictional power plant site (Otay Valley Power Plant) and substation (Jamul
Substation) in Southern California. You must balance two important considerations: keeping
construction costs down and minimizing risks to public safety.
The process of preparing a total cost surface involves deriving surfaces from existing surfaces. You will
need to add the slope and land use layers to create your total cost surface. First, you must reclassify
their value ranges to a common scale. In this case, you will use a scale of 1 to 10, where 1 indicates
best and 10 indicates worst.
To complete the exercise, you must download the data. If you have already downloaded and
installed the data, continue to the next step.
Start ArcMap.
1/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
The map opens and shows the area of Southern California where you will be working. The
dashed red line in the lower-left corner represents an existing power line.
Now you will set the default geodatabase for your map.
More information
Remind me how
1. In the Catalog window, click the Connect To Folder button .
3. Click OK.
Expand the SADistance folder, right-click Otay.gdb, and then choose Make Default
Geodatabase.
From this dialog box, you can set a variety of options for when you are running geoprocessing
tools. For example, you can turn background geoprocessing off and on. Background
geoprocessing basically means that tools run behind the scenes, with no visible progress
window. So far in the course, you have been running tools in the background, which is the
default setting. If you like the visible progress window, you can disable background
geoprocessing, and the progress window will appear as it has in previous versions.
To determine an optimum path, first you need to identify two points: where the path will begin
and where the path will end.
The Otay Valley Power Plant is where the path will begin—the source.
3/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
For this analysis, you will consider two factors that will impact the cost of constructing a power
line between the Otay Valley Power Plant and the Jamul Substation: steepness of slope and
type of land use.
You will use the Power Line DEM layer to create a slope layer.
4/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
In this analysis, the slope and land use data must be in raster format. These rasters are referred
to as cost surfaces and are the ones you will combine to create a total cost surface.
Cost surfaces are used to gauge the expense of travel across a surface. Time, money, effort, and
speed are examples of travel expense. In this case, a wildlife preserve with steep slopes would
be a more costly place to construct a power line than vacant land with shallow slope.
First, you need to derive a slope map from the digital elevation model (DEM).
Remind me how
1. From the Customize menu, choose Extensions.
2. In the Extensions dialog box, check the box next to Spatial Analyst, and then click Close.
Open the Slope (Spatial Analyst) tool and set the following parameters:
Input Raster: Power Line DEM
Output Raster: ..\EsriTraining\SADistance\Otay.gdb\PowerSlope
Output Measurement: PERCENT_RISE
5/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
Click OK.
If necessary, on the progress window for the Slope tool, check the box to Close This
Dialog When Completed Successfully, then click Close when the tool is completed.
In the table of contents, change the name of the new PowerSlope layer to Slope of
power line DEM.
If necessary, move the new layer just above the Land Use layer.
The slope raster shows where areas of high and low slope exist in the study area: green
represents low slope, yellow represents moderate slope, and red represents a steeper slope.
6/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
Based on the criteria for placing the transmission line, the green areas would probably work
best.
For this analysis, you will assume that steeper slopes add to construction costs, and you will
reclassify the slope layer accordingly.
In the table of contents, review the current classification of slope range for the Slope Of
Power Line DEM layer.
? If the slope range goes from zero to just over 30 percent and you are using a common scale
of 1 to 10, where 1 equals good and 10 equals worst, what will the reclassified slope value be
for a cell with 30 percent slope?
1
3
5
10
This is just how ArcMap drew the surface and does not take into account your analysis criteria.
You can do this on your own using reclassification by manually adding the values or using
remap files or tables. For the sake of time, you will use a pre-created table to reclassify each
layer.
In the Catalog window, go to your SADistance folder and open the Item Description for
the recslope table.
In the Item Description window, click the Preview tab to preview the table.
Compare these values to the values in the legend for the Slope Of Power Line DEM
layer.
7/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
Reclassification ranks various slope ranges. Notice that the lower slopes have lower rank (a
slope from 0 to 3 is ranked with a value of 1). The value 1 represents a scale of suitability. In this
case, the lower the slope, the more suitable for the transmission line. Notice that the higher
slope values have a rank of 10 (unsuitable).
Note: You can determine your own scale and values when you reclassify manually.
Open the Reclass By Table (Spatial Analyst) tool and set the following parameters:
Input Raster: Slope Of Power Line DEM
Input Remap Table: ..\EsriTraining\SADistance\recslope
Output Raster: ..\EsriTraining\SADistance\Otay.gdb\RecPowerSlope
Click OK.
In the table of contents, change the name of the new RecPowerSlope layer to Reclass of
power line slope.
If necessary, move the new layer just above the Slope Of Power Line DEM layer.
For Color Scheme, choose the Yellow To Dark Red color ramp.
Remind me how
1. Right-click the color ramp and uncheck Graphic View to switch to Text View.
8/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
Click OK.
The darker shades represent areas of shallow slope—areas where construction costs will be less
expensive than in the lighter colored areas.
Remove the Slope Of Power Line DEM layer from the table of contents.
Turn off the Reclass Of Power Line Slope layer and collapse its legend.
9/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
Now, you will reclassify the Land Use layer into the same ranking scale as the slope layer.
Reclassifying these rasters into a common scale will allow you to combine them for your final
analysis.
In the table of contents, expand the legend for the Land Use layer.
When you reclassified the slope layer, it was fairly straightforward because the slope layer
represents continuous data (reclass values of 1 correspond to the lowest slopes, 2 to the next
lowest, and so on). The data for the Land Use layer is discrete. A classification scheme in which
1 corresponds to airstrips, 2 corresponds to communications, and so on does not correspond
to the relative suitability of land use and the construction of power lines; therefore, you will
need to use a suitability reclass table.
Open the properties for Land Use and click the Source tab.
? What is the name of the raster dataset used as the source for this layer?
Close the Properties dialog box and open the Catalog window, if necessary.
10/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
This opens the Calculate Statistics geoprocessing tool. Statistics are required for a raster dataset
or mosaic dataset to perform some geoprocessing operations or certain tasks in ArcGIS
Desktop, such as applying a contrast stretch or classifying data.
A new layer has been added to the table of contents to represent the updated Newlanduse
raster.
Turn off the old Land Use layer and open the properties for Newlanduse.
Open the Reclassify (Spatial Analyst) tool and set the following parameters:
Input Raster: newlanduse
Reclass Field: Lutype
Output Raster: ..\EsriTraining\SADistance\Otay.gdb\RecLandUse
Now you will add a suitability reclass table that has been created for you.
Click Load.
Scroll through the list of values to see how the different land use types have been
ranked.
? Which of the following values in the reclassoflu table is the lowest cost land use type?
Vacant, graded
Heavy industrial
Landscape open space
Jails/Prisons
Locations such as Single Family Residential and Open Space Preserves have been ranked as
most cost-prohibitive. Vacant Land and Agricultural Areas have been given a lower cost ranking.
11/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
The land use values for Lakes/Reservoirs and Airstrips are missing from the list. Remember that
the power line path should not cross water or airstrips under any circumstances. While giving
these features a high reclass value (such as 10) would likely prevent the path from doing this,
you do not want to take any chances.
Instead, you will change the values that represent water and airstrips to NoData, because
Spatial Analyst will not allow the path to go through NoData cells.
Click OK.
In the table of contents, change the name of the new RecLandUse layer to Reclass of
land use.
If necessary, move the new layer just above the Newlanduse layer.
12/13
8/20/2020 Exercise: Prepare data for weighted distance analysis Print Window More information
Your new reclassified layer has default symbology and may differ from what you see in the result
graphic. Review the legend and match the colors with their scale value to see the cells that are
more suitable and the ones that are less suitable.
Turn off the Reclass Of Land use layer and collapse its legend.
If you will be continuing to the next exercise in this session, leave your map open;
otherwise, exit ArcMap.
13/13
8/20/2020 Exercise: Find the least-cost path Print Window
In this exercise, you will use the surfaces that you created in the previous exercise to create a total cost
raster that combines slope and land use.
After creating the total cost surface, you will perform a cost-weighted analysis. The cost-weighted
analysis will result in two new surfaces: cost distance and cost direction. The cost distance surface will
represent the aggregated cost of construction as you move farther away from the Otay Valley Power
Plant site. The cost direction surface will depict opportunities and obstructions to the flow of cost-
effective construction back to the power plant from any point in the study area.
You will then use the cost distance and cost direction layers as inputs for the least-cost path analysis to
determine the best place to put a transmission line. When combined, these layers are like an obstacle
course. The farther away you are, the more it costs you in time, money, and effort to reach the goal, but
there are also barriers that prevent you from taking a straight line to the goal. The least-cost path
analysis will find the most cost-effective path from the Jamul substation back to the Otay Valley Power
Plant.
Note: To complete this exercise, you must have successfully completed the previous
exercise,
In this step, you will create a total cost surface by combining the common scale values for the
Reclass Of Power Line Slope and Reclass Of Land Use layers. Areas of NoData in either of the
input layers will be NoData in the total cost layer.
Open the Plus (Spatial Analyst) tool and set the following parameters:
Input Raster Or Constant Value 1: Reclass of Power line Slope
1/8
8/20/2020 Exercise: Find the least-cost path Print Window
Click OK.
In the table of contents, move the Cost layer just above Reclass Of Land Use layer, if
necessary.
The resulting output layer is a new surface with a range of values between 3 and 19.
In the Layer Properties dialog box, on the Symbology tab, perform the following tasks:
Under Show, select Stretched.
For Color Ramp, choose Green Light To Dark.
For Display NoData as, choose a bright yellow color, such as Solar Yellow.
Check the box next to Invert.
2/8
8/20/2020 Exercise: Find the least-cost path Print Window
Click OK.
Notice the cells for the lake are represented as NoData (they were not included in the
reclassification).
3/8
8/20/2020 Exercise: Find the least-cost path Print Window
The darker shades indicate areas through which it will be less costly to construct a power line.
The areas of NoData will not be considered in the analysis.
In the table of contents, collapse the legend for the Cost layer.
It is important to remember that a total cost layer, like the one you just created, may represent
only one version of total costs. Typically, you might consider different combinations of
contributing factors, thereby creating several total cost surface alternatives.
In this step, you will create the cost-distance and cost-direction layers that are the final inputs to
the least-cost path analysis. Before you find the least-cost path for a power line between the
Otay Valley Power Plant and the Jamul substation, you must derive two surfaces from the total
cost surface.
One surface model is increasing costs as you travel farther away from the source. The other
surface model is increasing costs depending on the direction you are traveling. Both of these
surfaces are used as inputs to calculate the least-cost path.
Open the Cost Distance tool and set the following parameters:
Input Raster Or Feature Source Data: Otay Valley Power Plant
Input Cost Raster: Cost
Output Distance Raster: ..\EsriTraining\SADistance\Otay.gdb\Distance
Output Backlink Raster: ..\EsriTraining\SADistance\Otay.gdb\Direction
Click OK.
4/8
8/20/2020 Exercise: Find the least-cost path Print Window
In the table of contents, move the Direction layer just above the Cost layer and below
the Distance layer.
The Cost Distance To Otay Valley Power Plant layer represents how costs accumulate as you
move farther away from the source (the Otay Valley Power Plant). The Cost Distance layer takes
into account distance measurements from the source and the values of the Total Cost layer for
each location on the map.
Turn off the Cost Distance To Otay Valley Power Plant layer and collapse its legend.
5/8
8/20/2020 Exercise: Find the least-cost path Print Window
The Cost Direction To Otay Valley Power Plant layer also takes into account the Total Cost layer
and determines the bearing to the easiest (least costly) path back to the Otay Valley Power
Plant.
Turn off the Cost Direction To Otay Valley Power Plant layer and collapse its legend.
Neither of these new layers is easily understood, and they probably would not be used as a final
analysis, but when you combine them in the next step, they will form the obstacle course that
you will use in the final least-cost path analysis.
Now you are prepared to use the least-cost path function and find the least-cost path between
the source point, Otay Valley Power Plant, and the destination point, Jamul Substation.
Remember that the two cost factors, slope and land use, are not weighted but assume equal
influence.
Open the Cost Path tool and set the following parameters:
Input Raster Or Feature Destination Data: Jamul SubStation
Input Cost Distance Raster: Cost Distance To Otay Valley Power Plant
Input Cost Backlink Raster: Cost Direction To Otay Valley Power Plant
Output Raster: ..\EsriTraining\SADistance\Otay.gdb\LeastCostPath
6/8
8/20/2020 Exercise: Find the least-cost path Print Window
Click OK.
The resulting layer represents the least-cost path (avoiding steep slopes and costly land use
types) between the Otay Valley Power Plant and the Jamul SubStation. The path follows an
existing power line corridor and skirts the edges of a lake and open space preserve.
This preliminary analysis illustrates other considerations that you could incorporate into your
least-cost path model. Perhaps, for example, sharing the existing power line corridor is not
feasible, or you decide that the new power line must be at least 100 meters from any lake.
7/8
8/20/2020 Exercise: Find the least-cost path Print Window
These factors could be added to the total cost surface; then you would run the cost-weighted
distance and shortest path functions again.
8/8