Optimal Path As Raster (Raster Analysis)

Title  Optimal Path As Raster (Raster Analysis)

Summary

Calculates the optimal path from a source to a destination as a raster.


Usage


Syntax

Parameter Explanation
in_destination_data

When using polygon feature data for the input feature destinations, care must be taken with how the output cell size is handled, particularly when it is coarse relative to the detail present in the input. An internal rasterization process using the Polygon to Raster tool is applied, with a default setting for the Cell assignment type of CELL_CENTERCell center. This means that data that is not located at the center of the cell will not be included in the intermediate rasterized destination output, and will not be represented in the distance calculations. For example, if your destinations 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 of them will fall under the centers of the output raster cells, seemingly causing many of the others to be lost in the analysis.

A raster or feature dataset that identifies locations from which the optimal path is determined to the least costly source.

If the input is a raster, it must consist of cells that have valid values for the destinations, and the remaining cells must be assigned NoData. Zero is a valid value.

in_distance_accumulation_raster

The distance accumulation raster is used to determine the optimal path from the sources to the destinations.

The distance accumulation raster is usually created with the Distance Accumulation or Distance Allocation tools. Each cell in the distance accumulation raster represents the minimum accumulative cost distance over a surface from each cell to a set of source cells.

in_back_direction_raster

The back direction raster contains calculated directions in degrees. The direction identifies the next cell along the optimal path back to the least accumulative cost source while avoiding barriers.

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

destination_field (Optional)

The field to be used to obtain values for the destination locations.

path_type (Optional)

Specifies a keyword defining the manner in which the values and zones on the input destination data will be interpreted in the cost path calculations.

  • Each zone—For each zone on the input destination data, a least-cost path is determined and saved on the output raster. With this option, the least-cost path for each zone begins at the cell with the lowest cost distance weighting in the zone.
  • Best single—For all cells on the input destination data, the least-cost path is derived from the cell with the minimum of the least-cost paths to source cells.
  • Each cell—For each cell with valid values on the input destination data, a least-cost path is determined and saved on the output raster. With this option, each cell of the input destination data is treated separately, and a least-cost path is determined for each cell.
out_path_accumulation_raster

The output raster.

Code Samples

OptimalPathAsRaster example 1 (Python window)

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


Missing source code file
                    

OptimalPathAsRaster example 2 (stand-alone script)

Calculate the least-cost path from a source to a destination.


Missing source code file
                    

Tags

Credits

Use limitations