Skip To Content

Determine Optimum Travel Cost Network

Description

Determine Optimum Travel Cost Network diagram

The DetermineOptimumTravelCostNetwork task calculates the optimum cost network from a set of input regions.

Tip:

The Optimal Region Connections task provides enhanced functionality or performance.

The focus of DetermineOptimumTravelCostNetwork is to define the optimum network of least-cost paths between regions. On the resulting network, the phenomenon can move from one region to any other region using the paths (possibly traveling through other regions).

The input to DetermineOptimumTravelCostNetwork must be regions. A region is a connected series of cells (adjacent) with the same value. If you have disconnected cells with the same value, they are zones. Using zones as input to this task is not recommended. Determine Optimum Travel Network connects every region to every other region, so all regions, and all cells in the regions, can be reached through the resulting network.

Example applications

Example applications of this service include the following:

  • Suitability modeling

    From a suitability model, you have identified ten of the best habitat patches for bobcat. You want the bobcats to move between the patches through the most effective network of wildlife corridors to maintain genetic diversity within the metapopulation.

  • Timber harvest

    In a timber harvest, you want to create the most cost-efficient network of logging roads from which to extract the lumber.

  • Peacekeeping

    In a military peacekeeping deployment, you have identified five areas to position troops and personnel. You want to develop the best network of supply routes between the bases.

Request parameters

ParameterDetails
inputRegionsRasterOrFeatures

(Required)

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.

Syntax: This parameter can have either a raster input or a feature input. For raster input, this parameter can be specified as a portal item ID, a URL to a raster image service layer, a cloud raster dataset, or a shared raster dataset. For feature input, this parameter can be specified as either a URL to a feature service layer or a feature collection.

Raster input examples:

//Portal item as input raster
"inputRegionsRasterOrFeatures":{"itemId": <portal item id>}

//URL as input raster
"inputRegionsRasterOrFeatures":{"url":<image service layer url>}

Feature input examples:

//Feature layer URL
"inputRegionsRasterOrFeatures":{"url": <feature service layer url>}

//Feature collection
"inputRegionsRasterOrFeatures":{"layerDefinition": {}, "featureSet": {}}
inputCostRaster

(Required)

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.

Syntax: This parameter can be specified as a portal item ID, a URL to a raster image service layer, a cloud raster dataset, or a shared raster dataset.

Examples:

//Portal item as input raster
"inputCostRaster": {"itemId": <portal item id>}

//URL as input raster
"inputCostRaster": {"url": <image service layer url>}
outputOptimumNetworkName

(Required)

The task will create a feature service of the results. You can define the name of the service.

Output feature service examples:

//REST web example
myOutput

//REST scripting example
"outputOptimumNetworkName" : "myOutput1"
outputNeighborNetworkName

The task will create a feature service of the results. You can define the name of the service.

Output feature service examples:

//REST web example
myOutput

//REST scripting example
"outputNeighborNetworkName" : "myOutput2"
context

Contains additional settings that affect task processing. This task has the following settings:

  • Extent (extent)—A bounding box that defines the analysis area.
  • Output Spatial Reference (outSR)—The output raster will be projected into the output spatial reference.
  • Snap Raster (snapRaster)—The output raster will have its cells aligned with the specified snap raster.
  • Cell Size (cellSize)—The output raster will have the resolution specified by cell size.
  • Mask (mask)—Only cells that fall within the analysis mask will be considered in the operation.
f

The response format. The default response format is html.

Values: html | json | pjson

Response

When you submit a request, the task assigns a unique job ID for the transaction.

{
  "jobId": "<unique job identifier>",
  "jobStatus": "<job status>"
}

After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:

https://<raster analysis tools url>/DetermineOptimumTravelCostNetwork/jobs/<jobId>

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:

https://<raster analysis tools url>/DetermineOptimumTravelCostNetwork/jobs/<jobId>/results/<output parameter>

Example usage

Below is a sample request url for DetermineOptimumTravelCostNetwork.

https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/DetermineOptimumTravelCostNetwork/submitJob

JSON Response example

The response returns the outputOptimumNetworkFeatures and outputNeighborNetworkFeatures output parameters, which have properties for parameter name, data type, and value. The content of value depends on the outputOptimumNetworkName and outputNeighborNetworkFeatures parameters provided in the initial request, affecting the output parameters respectively. For example, if the outputOptimumNetworkName parameter is provided, the value for outputOptimumNetworkFeatures will contains the feature service layer url. If it was not included in the request, the value will contain a feature collection.

Network name included in request example:


{
  "paramName":"resultLayer",
  "dataType":"GPString",
  "value":{"url":"<hosted feature service layer url>"
}

Network name not included in request example:


{
  "paramName":"resultLayer",
  "dataType":"GPString",
  "value":{"layerDefinition": {}, "featureSet": {}}
}