Determine Optimum Travel Cost Network (Raster Analysis)

Summary

Calculates the optimum cost network from a set of input regions.

Tip:

The Optimal Region Connections tool provides enhanced functionality or performance.

Illustration

Determine Optimum Travel Cost Network tool illustration

Usage

  • This raster analysis portal tool is available when you are signed in to an ArcGIS Enterprise Link to Understanding analysis in ArcGIS Enterprise portal that has an ArcGIS Image Server Link to What is ArcGIS Image Server configured for Raster Analysis Link to Configure and deploy raster analytics. When the tool is invoked, ArcGIS Pro serves as a client and the processing occurs in the servers federated with ArcGIS Enterprise. The portal tool accepts layers from your portal as input and creates output in your portal.

    The input raster layer supports a layer from the portal, a URI or URL to an image service, or the output from the Make Image Server Layer tool. The input feature layer can be a layer from the portal or a URI or URL to a feature service. This tool does not support local raster data or layers. While you can use local feature data and layers as input to this portal tool, best practice is to use layers from your portal as input.

  • One example application of this tool is finding the best network for emergency vehicles.

  • In a raster, a region is a group of cells with the same value that are contiguous to one another (adjacent). When your input regions are identified by a raster, if any zones (cells with the same value) are composed of multiple regions, first preprocess the data to assign unique values to each region.

  • Cell locations with NoData in the Input cost raster act as barriers.

  • The Input cost raster cannot contain values of zero since the algorithm is a multiplicative process. If your cost raster does contain values of zero, and these values represent areas of lowest cost, change values of zero to a small positive value (such as 0.01) before running Determine Optimum Travel Cost Network

  • For Ouput neighbor network, the neighbors are not identified by Euclidean distance but instead are identified by cost distance. Therefore, a region's closest neighbor is the cheapest one to travel to, not the one that is closest in distance

Parameters

LabelExplanationData Type
Input Regions Raster or Features

The input regions that are to be connected by the least-cost network.

Regions can be defined by either an image service or a feature service.

If the region input is a raster, the regions are defined by groups of contiguous (adjacent) cells of the same value. Each region must be uniquely numbered. The cells that are not part of any region must be NoData. The raster type must be integer, and the values can be either positive or negative.

If the region input is a feature, it can be polygons, lines, or points. Polygon feature regions cannot be composed of multipart polygons.

Raster Layer; Image Service; Feature Layer; String
Input Cost Raster

A raster defining the impedance or cost to move planimetrically through each cell.

The value at each cell location represents the cost-per-unit distance for moving through the cell. Each cell location value is multiplied by the cell resolution while also compensating for diagonal movement to obtain the total cost of passing through the cell.

The values of the cost raster can be integer or floating point, but they cannot be negative or zero (you cannot have a negative or zero cost).

Raster Layer; Image Service; String
Output Optimum Network Name

The name of the output optimum network feature service.

The polyline feature service of the optimum (least-cost) network of paths necessary to connect each of the input regions.

Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those fields include the following:

  • PATHID—Unique identifier for the path
  • PATHCOST—Total accumulative cost for the path
  • REGION1—The first region the path connects
  • REGION2—The other region the path connects

This information provides you insight into the paths within the network.

Since each path is represented by a unique line, there will be multiple lines in locations where paths travel the same route.

String
Output Neighbor Network Name
(Optional)

The name of the output Neighbor network feature service.

The polyline feature service identifying all paths from each region to each of its closest-cost neighbors.

Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those fields include the following:

  • PATHID—Unique identifier for the path
  • PATHCOST—Total accumulative cost for the path
  • REGION1—The first region the path connects
  • REGION2—The other region the path connects

This information provides you insight into the paths within the network and is particularly useful when deciding which paths should be removed if necessary.

Since each path is represented by a unique line, there will be multiple lines in locations where paths travel the same route.

String

Derived Output

LabelExplanationData Type
Output Optimum Network Features

The output optimum network features.

Raster Layer
Output Neighbor Network Features

The output neighbor network features.

Feature Class

arcpy.ra.DetermineOptimumTravelCostNetwork(inputRegionsRasterOrFeatures, inputCostRaster, outputOptimumNetworkName, {outputNeighborNetworkName})
NameExplanationData Type
inputRegionsRasterOrFeatures

The input regions that are to be connected by the least-cost network.

Regions can be defined by either an image service or a feature service.

If the region input is a raster, the regions are defined by groups of contiguous (adjacent) cells of the same value. Each region must be uniquely numbered. The cells that are not part of any region must be NoData. The raster type must be integer, and the values can be either positive or negative.

If the region input is a feature, it can be polygons, lines, or points. Polygon feature regions cannot be composed of multipart polygons.

Raster Layer; Image Service; Feature Layer; String
inputCostRaster

A raster defining the impedance or cost to move planimetrically through each cell.

The value at each cell location represents the cost-per-unit distance for moving through the cell. Each cell location value is multiplied by the cell resolution while also compensating for diagonal movement to obtain the total cost of passing through the cell.

The values of the cost raster can be integer or floating point, but they cannot be negative or zero (you cannot have a negative or zero cost).

Raster Layer; Image Service; String
outputOptimumNetworkName

The name of the output optimum network feature service.

The polyline feature service of the optimum (least-cost) network of paths necessary to connect each of the input regions.

Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those fields include the following:

  • PATHID—Unique identifier for the path
  • PATHCOST—Total accumulative cost for the path
  • REGION1—The first region the path connects
  • REGION2—The other region the path connects

This information provides you insight into the paths within the network.

Since each path is represented by a unique line, there will be multiple lines in locations where paths travel the same route.

String
outputNeighborNetworkName
(Optional)

The name of the output Neighbor network feature service.

The polyline feature service identifying all paths from each region to each of its closest-cost neighbors.

Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those fields include the following:

  • PATHID—Unique identifier for the path
  • PATHCOST—Total accumulative cost for the path
  • REGION1—The first region the path connects
  • REGION2—The other region the path connects

This information provides you insight into the paths within the network and is particularly useful when deciding which paths should be removed if necessary.

Since each path is represented by a unique line, there will be multiple lines in locations where paths travel the same route.

String

Derived Output

NameExplanationData Type
outputOptimumNetworkFeatures

The output optimum network features.

Raster Layer
outputNeighborNetworkFeatures

The output neighbor network features.

Feature Class

Code sample

DetermineOptimumTravelCostNetwork example 1 (Python window)

This example calculates the optimum travel cost network.

import arcpy

arcpy.DetermineOptimumTravelCostNetwork_ra(
    "https://myserver/rest/services/sources/ImageServer", 
	"https://myserver/rest/services/costsurface/ImageServer", 
    "outoptimumnetwork1")
DetermineOptimumTravelCostNetwork example 2 (stand-alone script)

This example calculates the optimum travel cost network.

#-------------------------------------------------------------------------------
# Name: DetermineOptimumTravelCostNetwork_Ex_02.py
# Description: Calculates the optimum travel cost network.
# Requirements: ArcGIS Image Server

# Import system modules
import arcpy

# Set local variables
inputSourceLayer = 'https://MyPortal.esri.com/server/rest/services/Hosted/sources/ImageServer'
inputCostLayer = 'https://MyPortal.esri.com/server/rest/services/Hosted/costraster/ImageServer'
outputOptimumNetworkName = 'outNetworkRaster'
outputNeighborName = 'outNeighborRaster'

arcpy.DetermineOptimumTravelCostNetwork_ra(inputSourceLayer, zoneField, inputCostLayer,
                               outputOptimumNetworkName, outputNeighborName)

Licensing information

  • Basic: Requires ArcGIS Image Server
  • Standard: Requires ArcGIS Image Server
  • Advanced: Requires ArcGIS Image Server

Related topics