Optimal Path As Raster

Optimal Path As Raster tool illustration


This tool calculates the optimal path from destinations to sources as a raster.

Example applications include the following:

Choose destination raster or features


A raster or feature layer that identifies the cells from which the optimal path is determined to the optimum source.

If the input is a raster, it must consist of cells that have valid values (zero is a valid value) for the destinations, and the remaining cells must be assigned NoData. The input raster type must be integer.

Destination field (optional)


The field used to obtain values for the destination locations.

This field must be of type integer.

Choose distance accumulation raster


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

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.

Choose back direction or flow 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 back direction raster is usually created with the Distance Accumulation or Distance Allocation tools. In this case the range of values is from 0 degrees to 360 degrees. The value 0 is reserved for the source cells. Due east (right) is 90 degrees, and the values increase clockwise (180 is south, 270 is west, and 360 is north).

The optimal path created can be a flow path based on D8 flow direction. To generate an optimal path in this way, use a D8 flow direction raster as input for this parameter.

Path type (optional)


Specifies a keyword that defines how the values and zones in the input destination data will be interpreted in the path calculations.

  • To Each Zone—For each zone in the input destination data, a least-cost path is determined. With this option, the least-cost path for each zone begins at the cell with the lowest cost distance weighting in the zone. This is the default.
  • Best Single—For all cells in the input destination data, the least-cost path is derived from the cell with the minimum of the least-cost paths to source cells.
  • To Each Cell—For each cell with valid values in the input destination data, a least-cost path is determined. With this option, each cell of the input destination data is treated separately, and a least-cost path is determined for each cell.

Result raster layer name


The name of the layer that will be created in My Content and added to the map. The default name is based on the tool name and the input layer name. If the layer already exists, you will be prompted to provide another name.

You can specify the name of a folder in My Content where the result will be saved using the Save result in drop-down box. If you have the privileges to create both tiled and dynamic imagery layers, you can specify which layer type to generate in the output using the Save result as drop-down box.