How distance accumulation works

Available with Spatial Analyst license.

In many distance analyses, the Distance Accumulation tool is the primary tool to use for calculating straight-line or cost distance rasters. The output can be used directly or as input to other tools to connect regions over the distance surfaces. A companion tool is the Distance Allocation tool, and is discussed in the last section of this topic.

There are two aspects to consider when calculating distance:

  • Determine how far away something is
  • Once that distance is determined, account for the rate that distance is encountered by a traveler

There are two ways for adjusting the basic straight-line distance:

  • A barrier is in the way
  • Adjust for the actual distance when accounting for the surface over which the calculations are determined

Once the adjusted straight-line distance is determined, the goal of your analysis may be to understand how that distance is encountered. That is, the rate the traveler covers the distance units. The rate the straight-line distance is encountered, especially when a cost surface has been identified, is often referred to as cost distance. There are four ways you can control the rate distance is encountered:

  • Specify a cost surface. The cost surface can identify areas that are difficult to move across, such as swampy ground, and areas that are easy to traverse, such as open fields.
  • Identify the characteristics of the traveler. For example, an all terrain vehicle (ATV) can travel over the same distance faster than a traveler on foot.
  • Specify a vertical factor to account for the effect of slopes. For example, the extra effort to overcome gravity means it is slower to go up a steep slope than down it.
  • Specify a horizontal factor to account for impediments to forward progress. For example, a cyclist can cover more ground more quickly with a tailwind as opposed to a headwind and is only moderately impacted by crosswinds.

Distance Accumulation tool

The Distance Accumulation tool includes parameters that will be helpful when performing your analysis. The following sections identify various objectives as well as the specific parameters to use to achieve them. By evaluating these options sequentially, you can determine the parameters that apply to your situation.

Calculate straight-line distance

To calculate the straight-line distance from the source, provide the source, name the output, and run the tool.

Adjust straight-line distance calculations

To adjust straight-line distance calculations if a barrier is present that must be navigated around, provide a barrier for the Input barrier raster or feature data parameter. Examples of barriers include a river, road, or cliff.

To account for the actual surface distance that is traveled when going up and down hills in the landscape, provide an elevation surface for the Input surface raster parameter.

Determine the rate at which the straight-line distance is encountered

You can specify how the rate at which the distance is encountered by the traveler in the following ways:

  • To simulate the cost or preference of the traveler for the features they would encounter as they move through each cell, first create a cost surface and enter it into the Input cost raster parameter when you run the Distance Accumulation tool. Examples of such features include land use type, distance from streams, and aspect.
  • If the traveler has special characteristics that would affect how they move over the distance, specify them with the appropriate source characteristic parameters. Some examples of these characteristics include the mode of travel, the time required to prepare the mode of travel, range limits on the mode of travel, or if there is a difference between moving away from or toward the sources.
  • To account for the additional energy necessary to move up and down slopes, specify the appropriate vertical factor parameters.
  • If there are horizontal factor that will affect the effort or speed when moving over the distances, specify the appropriate horizontal factor parameters. Examples of such factors include wind and water currents.

Additional considerations

If you are performing analysis in projected data over a large area, use the geodesic option for the Distance Method parameter.

If you will be using the output from the Distance Accumulation tool to create the shortest or least-cost paths to destinations using either the Optimal Path As Line or Optimal Path As Raster tools, specify a name for the optional Out back direction raster parameter.

Output rasters from the Distance Accumulation tool

You can use the Distance Accumulation tool to create multiple output rasters for distance analysis. Those outputs and their purpose are as follows:

  • The distance accumulation raster calculates the accumulative distance to the closest source or least-cost source.
  • The back-direction raster indicates the direction to travel from each cell to return to the closest source or least-cost source.
  • The source direction raster determines the direction to the closest or least-cost source.
  • The source location raster identifies the row and column of the closest or least-cost source.

Distance accumulation output raster

If only straight-line distance is being calculated, the distance accumulation raster records the measured distance from every nonsource cell to the closest source. The units of the distance values recorded are linear units, such as feet or meters, based on the output spatial reference.

Map of straight-line distance from six points
The straight-line distance from six aid stations (sources). The output is in linear units.

If a cost surface, source characteristic, vertical factor, or horizontal factor are provided, the accumulative distance raster records, for each cell, the accumulative cost to reach the least-cost source.

Map of accumulative cost distance from six points
The accumulative cost distance raster accounting for a cost surface. The output is a rate based on cost.

Back-direction output raster

For each cell, the back-direction raster contains the direction in degrees that the traveler should take to move back toward a source.

If only straight-line distance is being calculated, the back-direction values identify the next cell along the shortest path back to the closest source. If cost distance is being calculated, the direction values identify the next cell along the least-cost path back to the cheapest source.

The range of values is from 0 degrees to 360 degrees, with 0 reserved for the source cells. Due east, to the right, is 90, and the values increase clockwise, so that 180 is south, 270 is west, and 360 is north.

Back direction map accounting for the cost surface
The back-direction raster identifying for each cell the direction to leave the cell in route to the cheapest source.

An important use of the back-direction raster is to determine the shortest or least-cost path between two locations. The accumulative distance and back direction are necessary input to the Optimal Path As Line and Optimal Path As Raster tools.

Source direction output raster

The source direction raster identifies the direction of the closest or least cost source cell as an azimuth in degrees.

The range of values is from 0 degrees to 360 degrees, with 0 reserved for the source cells. Due east, to the right, is 90, and the values increase clockwise, so that 180 is south, 270 is west, and 360 is north.

When calculating straight-line distance, the source direction and back direction rasters will be similar. However, when a barrier or any of the rate controlling parameters, cost surface, vertical and horizontal factors, or the source characteristics, are specified, the source direction and back-direction rasters will likely be different.

Source direction map identifying the straight line direction back to the cheapest source
The source-direction raster identifies, for each cell, the straight line direction to the cheapest source. It identifies the direction of the cheapest source, not how to travel to it.

Source location output raster

For each cell, the source location output identifies the row and column address of the closest or least-cost source location.

The output is a multiband raster. The first band contains a row index, and the second band contains a column index. These indexes identify the location of the source cell that is closest or is least costly to reach.

Distance Allocation tool

A related tool to Distance Accumulation is Distance Allocation. All the parameters and the outputs are the same, with the exception that Distance Allocation also outputs an allocation raster. For each cell, this raster indicates the closest or least-cost source for that cell to reach.

If only the straight-line distance is calculated, the output distance allocation raster identifies the closest source to each cell. That is, it identifies the cells that will be allocated to a source based on closest distance.

If the cost distance is calculated, the allocation raster indicates the least-cost source for each cell.

Distance allocation map identifying for each cell the cheapest source
The distance allocation map identifying, for each cell, which is the cheapest source for it to reach.

Related topics