Cost Distance Operations


Scope

Interpolating and analyzing surface features on DEM data in a raster GIS environment.

Software
ESRI ArcView GIS v3.2, SunOS
Spatial Analyst Extension

Data Inputs
Region of Interest City of Kanata, Ontario, Canada
Projection UTM, zone 18, NAD 83, units meters
Coverage Data kan_spothts Elevation data
  kan_roads2 Roads / transportation
  dem_aoi Area of interest

Analysis Properties
Extent dem_aoi
Cell Size 10m (600x600)

Weighted Distance Functions - Overview

These non-Euclidean distance routines are a function of the shortest weighted distance (or accumulated travel cost) from each cell to the nearest cell in the set of source cells. As a result, true Euclidean distance is not considered in this scenario.

All weighted distance functions require a source grid (with zones), and cost grid (which assigns impedance, depicting cost of moving within the cell set).

The "cost" of following a particular path is determined by the value of the pixels in the "friction" or cost raster that are traversed and the direction travelled across the pixels. Pixel values in the cost raster are computed by adding the friction pixel values for the lowest cost path to the cheapest source pixel in the lattice.

COST = FRICTION.value * 1
' Manhattan gridding

COST = FRICTION.value * 1.414
' Diagonal movement.

Some GIS add ½ pixel, others just use the whole value of the from pixel. This is based on the "pixel-is-point" vs. "pixel-is-area" referred to in the Image Registration study.

Cost-distance derived modelling path routes can be applied to many applications. The table below outlines some examples.

Application Example Cost
Transportation hi traffic periods
  speed limits
  road quality/conditions
Military dangerous zones of enemy attack
Parks and Recreation Barriers to walking/bicycle paths

This study will generate best path models for a FROM and TO point, based on elevation data and vegetation indexes.

Modelling the Path

kan_spothts was interpolated via IDW using the default inputs. A slope and hillshade was also applied to the coverage:

IDW_10 = IDW(kan_spothts.shp,Zval,#,2,SAMPLE,12,#,10,348000, 5018000, 354000, 5024000)

hlshd1 = HILLSHADE(idw_10,315,45,#,#)

slope1 = SLOPE(idw_10)

The output slope theme was then reclassified as follows:

Slope Class Difficulty Factor
0-2% 1
2-5% 2
5-10% 4
10-15% 8
15-20% 16
20-30% 32

kan_veg was then converted to grid with the assigned values, representing the likelihood factors (1-5). It was found that the No Data value, when converted to grid, must be reclassified into another value to generate valid cost distance and cost path models. As a result, the value was set to zero (0) as per the unlikeness mentioned in the specification.

Two output models were generated using the Map Calculator in Spatial Analyst.

The themes representing start and destination were converted to grid to render cost distance and direction grid models using the Map Calculator function more efficiently. XY point locations were then added to the theme using the View.AddXYCoordToFTab script within ArcView's samples/scripts/ area.

Distance calculations were then run to generate cost-distance and direction grids.

The ReturnCostPath.ave script was then run against the distance, direction, and end-point themes. The graphic was extracted to a view, then calcapl.ave was run to derive the length of the pathway. The pseudo-script with comments below explains for both scenarios:
START = pointgrid(start.shp)
END   = pointgrid(destin.shp)

SLOPE_RECLASS = RECLASS(slope_idw_10)...
VEG_RECLASS   = RECLASS(kan_veg)...

MODEL       = SLOPE_RECLASS + VEG_RECLASS
' MODEL      = SLOPE_RECLASS * VEG_RECLASS
' comment one line out depending on model

COST_DIST = START.CostDistance([MODEL],"DIRECTION".AsFileName,nil,nil)

' Records the accumulated cost to the closest source cell in the 
' input over the specified per-cell cost surface

' COSTDISTANCE accumulative cost formula:
' acc_cost = a1 + ((cost2 + cost3) / 2)


END.CostPath([COST_DIST],[DIRECTION],True)
' Records the least cost path from each selected cell in the
' lattice to the closest course cell in terms of cost distance

ReturnCostPath(COST_DIST,DIRECTION,XY(END))

Theme | New Theme (Line, "ThemeX.shp")
ThemeX.shp.Paste(View.CopyGraphic)
Calcapl.ave(ThemeX.shp)

As a result, the cheapest cost, in non-Euclidean space, is generated based on the distance and direction grid inputs.

Alternative Model

An alternative model was produced, representing vegetation as the sole cost surface factor. The No Data value was used, and the other values merged into one value to represent absolute barriers. The routine above was rerun using this cost surface (KAN_VEG) as the input MODEL variable.

As a result, the three models mentioned (additive, multiplicative, vegetation only) were run to create pathways for two different destination co-ordinates. The table below shows the route lengths for each scenario.

Model Type End Point (X,Y) Length of Path (m)
Kan_ver + slope 3491118.35564,5019343.78585 6553.057
Kan_ver * slope 3491118.35564,5019343.78585 733123.176
Vegetative only 3491118.35564,5019343.78585 5933.717
Kan_ver + slope 348500.00000,5020000.00000 6517.788
Kan_ver * slope 348500.00000,5020000.00000 831486.399
Vegetative only 348500.00000,5020000.00000 6241.047

[Additive Model Paths]

Analysis

It is evident that the multiplicative models have the longest route due to the zero value of the No Data reclassed kan_veg cells, attributed to the multiplication of the grid values, rendering substantially higher route lengths. The Vegetative only model showed little cost difference when generalizing to absolute or Boolean barriers. As a result, generalizing the vegetative factors did not make significant changes, while reducing computational intensity. As always, detail and CPU usage is at the discretion of the user, project scope and environment.

Visibility

The visibility function was used to derive areas, which could be seen by the destination (end) point, for both end point XY scenarios. The elevation for the destination point is derived from the elevation grid. The function scans the entire surface for areas, which are visible.

[Multiplicative Model Paths]

Visibility - Offsetting elevation

The 'OFFSETA' field was then added to the destination point with a value of 5m, and the visibility run again. As a result, more areas are visible from the end point due to the heightened offset value. A general trend recognized is that as offset height of the observation point increases, the viewshed analysis will render more visible areas/regions, when applied to the same elevation lattice. This field and value is picked up by the function if available.

[Viewshed / Line of Sight]


Tom Kralidis
November 2000