- URL:https://<rasteranalysistools-url>/OptimalRegionConnections
- Version Introduced:10.8.1
Description
The OptimalRegionConnections task calculates the optimal connectivity network between two or more input regions.
The focus of OptimalRegionConnections is to define the optimum connections of least-cost paths between regions. On the resulting connections, the phenomenon can move from one region to any other region using the paths (possibly traveling through other regions).
The input to OptimalRegionConnections 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. Optimal Region Connections connects every region to every other region, so all regions, and all cells in the regions, can be reached through the result.
Example applications
Example applications of this service include the following:
- Suitability modeling
From a suitability model, you have identified 10 of the best habitat patches for bobcats. 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 at which to position troops and personnel. You want to develop the optimally connected supply routes between the bases.
Request parameters
Parameter | Details |
---|---|
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:
Feature input examples:
|
outputOptimalLinesName (Required) | The name of the output line feature service that connects each input region. Each path (or line) is uniquely numbered, and additional fields in the attribute table store specific information about the path. Those additional fields are the following:
This information provides 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. The task will create a feature service of the results. You can define the name of the service. Output feature service examples:
|
inputBarrierRasterOrFeatures | The layer that defines the barriers to calculate the back direction around. The barriers can be defined by an integer or a floating-point image service, or by a feature service. For an image service barrier, the barrier must have a valid value, including zero, and the areas that are not barriers must be NoData. Raster input examples:
Feature input examples:
|
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. 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:
|
outputNeighborConnectionsName | The task will create a feature service of the results. You can define the name of the service. Output feature service examples:
|
distanceMethod | Determines whether to calculate the distance using a planar (flat earth) or a geodesic (ellipsoid) method.
|
connectionsWithinRegions | Specifies whether the paths will continue and connect within the input regions.
|
context | Contains additional settings that affect task processing. This task has the following settings:
|
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>/OptimalRegionConnections/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>/OptimalRegionConnections/jobs/<jobId>/results/<output parameter>
Example usage
Below is a sample request URL for OptimalRegionConnections.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/OptimalRegionConnections/submitJob
JSON Response example
The response returns the outputOptimumNetworkFeatures and outputNeighborConnectionsFeatures output parameters, which have properties for parameter name, data type, and value. The content of value depends on the outputOptimalLinesName and outputNeighborConnectionsFeatures parameters provided in the initial request, affecting the output parameters, respectively. For example, if the outputOptimalLinesName parameter is provided, the value for outputOptimumNetworkFeatures will contain 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": {}}
}