- URL:
- https://<root>/<serviceName>/RasterAnalysisTools/GPServer/OptimalRegionConnections
- Methods:
GET
- Version Introduced:
- 10.8.1
Description
The Optimal
task calculates the optimal connectivity network between two or more input regions.
The focus of Optimal
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 Optimal
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 |
---|---|
(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:
|
(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:
|
| 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:
|
| A raster defining the impedance or cost to move planimetrically through each cell. The values of the cost raster can be integer or floating point. Negative and zero are invalid values but will be treated as very small positive cost values. 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. Cost raster values that are negative or zero are invalid but will be treated as small positive values. The accumulative cost algorithm is a multiplicative process, and it cannot calculate accumulative cost correctly if cost values are negative or zero. If your cost raster does contain those values, and those locations are to represent areas that should be excluded from the analysis, those cells should be turned into NoData before running the tool. Note that NoData is treated as a barrier in this analysis, so any locations that are NoData in the input will be NoData in the result. 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:
|
|
The task will create a feature service of the results. You can define the name of the service. Output feature service examples:
|
| Determines whether to calculate the distance using a planar (flat earth) or a geodesic (ellipsoid) method.
|
| Specifies whether the paths will continue and connect within the input regions.
|
|
Contains additional settings that affect task processing. This task has the following settings:
|
|
The response format. The default response format is Values: |
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 job
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 job
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 esri
, 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 Optimal
.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/OptimalRegionConnections/submitJob
JSON Response example
The response returns the output
and output
output parameters, which have properties for parameter name, data type, and value. The content of value depends on the output
and output
parameters provided in the initial request, affecting the output parameters, respectively. For example, if the output
parameter is provided, the value for output
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": {}}
}