DistanceAccumulation

Titleā€ƒ DistanceAccumulation

Summary

Calculates accumulated distance for each cell to sources, allowing for straight-line distance, cost distance, true surface distance, as well as vertical and horizontal cost factors.


Usage

The input source data can be a feature class or raster.

When the input source data is a raster, the set of source cells consists of all cells in the source raster that have valid values. Cells that have NoData values are not included in the source set. The value 0 is considered a legitimate source. A source raster can be created using the extraction tools.

When the input source data is a feature class, the source locations are converted internally to a raster before performing the analysis. The resolution of the raster can be controlled with the Cell Size environment. By default, if no other rasters are specified in the tool, the resolution will be determined by the shorter of the width or height of the extent of the input feature, in the input spatial reference, divided by 250.

When using feature data for the input source data, care must be taken with how the output cell size is handled when it is coarse, relative to the detail present in the input. The internal rasterization process uses the same default Cell assignment type as the Feature to Raster tool, which is the cell center method. This means that data not located at the center of the cell will not be included in the intermediate rasterized source output, so it will not be represented in the distance calculations. For example, if your sources are a series of small polygons (such as building footprints) that are small relative to the output cell size, it is possible that only a few will fall under the centers of the output raster cells, seemingly causing most of the others to be lost in the analysis.

To avoid this situation, as an intermediate step, you could rasterize the input features directly with the Feature to Raster tool and set the Field parameter. Then use the resulting output as input to the particular distance tool you want to use. Alternatively, you could select a small cell size to capture the appropriate amount of detail from the input features.

If there is NoData on any of these inputs: Input cost raster, Input surface raster, Input vertical raster, or Input horizontal raster, the cells at those locations across all inputs are ignored in the calculation. NoData on any of these rasters is persisted throughout the calculation and therefore is NoData on all outputs.

If a source falls on NoData in any of the corresponding input rasters, it is ignored in the analysis and therefore no distance from that source will be calculated.

When no Extent environment setting is specified, the processing extent is determined in the following way:

If only the Input raster or feature source data and Input barrier raster or feature data are specified, the union of the inputs, expanded by two cell widths on each side, is used as the processing extent. The reason the output raster is expanded by two rows and columns is so that the outputs are used in Optimal Path As Line and Optimal Path As Raster and the generated paths can move around the barriers. To use the extent as an implicit barrier, you must explicitly set the Extent in the environment settings.

If any of the following raster datasets are specified, Input surface raster, Input cost raster, Input vertical raster, or Input horizontal raster, the processing extent is the intersection of these rasters.

When the Cell Size or Snap Raster environment settings are not specified, and there are multiple rasters specified as inputs, the Cell Size and Snap Raster are set based on an order of precedence: Input cost raster, Input surface raster, Input vertical raster, Input horizontal raster, Input raster or feature source data, and Input barrier raster or feature data.

The default values for the Vertical factor modifiers are the following:

The output of the Aspect tool can be used as input for the Input horizontal raster.

The default values for the Horizontal factor modifiers are the following:

The characteristics of the source, or the movers from, or to a source, can be controlled by specific parameters. Initial accumulation sets the initial cost before the movement begins. Maximum accumulation specifies how much cost a source can accumulate before reaching its limit. Multiplier to apply to costs specifies the mode of travel or magnitude at the source. Travel direction identifies whether the mover is starting at a source and moving to nonsource locations or starting at nonsource locations and moving back to a source.

If any of the source characteristics parameters are specified using a field, the source characteristic will be applied on a source-by-source basis, according to the information in the given field for the source data. When a keyword or a constant value is given, it will be applied to all sources.

If Initial accumulation is specified, the source locations on the output cost distance surface will be set to the Initial accumulation value; otherwise, the source locations on the output cost distance surface will be set to zero.

This tool supports parallel processing. If your computer has multiple processors or processors with multiple cores, better performance may be achieved, particularly on larger datasets. The Parallel processing with Spatial Analyst help topic has more details on this capability and how to configure it.

When using parallel processing, temporary data will be written to manage the data chunks being processed. The default temp folder location will be on your local C: drive. You can control the location of this folder by setting up a system environment variable named TempFolders and specifying the path to a folder to use (for example, E:\RasterCache). If you have admin privileges on your machine, you can also use a registry key (for example, [HKEY_CURRENT_USER\SOFTWARE\ESRI\Desktop10.7\Raster]).If you have admin privileges on your machine, you can also use a registry key (for example, [HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro\Raster]).

By default, this tool will use 50 percent of the available cores. If the input data is smaller than 5,000 by 5,000 cells in size, fewer cores may be used. You can control the number of cores the tool uses with the Parallel processing factor environment.

See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.


Syntax

Parameter Explanation
inputSourceRasterOrFeatures

outputDistanceAccumulationRasterName

inputBarrierRasterOrFeatures (Optional)

inputSurfaceRaster (Optional)

inputCostRaster (Optional)

inputVerticalRaster (Optional)

verticalFactor (Optional)

inputHorizontalRaster (Optional)

horizontalFactor (Optional)

outputBackDirectionRasterName (Optional)

outputSourceDirectionRasterName (Optional)

outputSourceLocationRasterName (Optional)

sourceInitialAccumulation (Optional)

sourceMaximumAccumulation (Optional)

sourceCostMultiplier (Optional)

sourceDirection (Optional)

distanceMethod (Optional)

context (Optional)

Code Samples

DistanceAccumulation example 1 (Python window)

The following Python Window script demonstrates how to use the DistanceAccumulation tool.


Missing source code file
                    

DistanceAccumulation example 2 (stand-alone script)

Calculate, for each cell, the least accumulative cost distance to the nearest source, while accounting for surface distance and horizontal and vertical cost factors.


Missing source code file
                    

Tags

Credits

Use limitations