- URL:https://<rasteranalysistools-url>/LocateRegions
- Version Introduced:10.9.1
Description
The LocateRegions task identifies the best regions, or groups of contiguous cells, from an input utility (suitability) raster that satisfy a specified evaluation criterion and that meet identified shape, size, number, and interregion distance constraints.
Some example applications of LocateRegions include the following:
- Find the most preferred deer habitat to conserve. Eight habitat patches (regions) are needed to maintain a viable population and each region must be approximately 50 contiguous acres. To support breeding opportunities within the herd, the regions should be close enough to one another so that they can be feasibly connected via wildlife corridors.
- Find the best locations to extract timber for a logging operation. To be financially viable, the areas (regions) to be logged must be at least 250 contiguous acres and each region must be within one mile from another.
- Find the ideal location for a new shopping center. The shopping center requires the best 60 acres, however, for construction purposes, the area need to be contiguous and the shape of the building site (region) should be as compact as possible.
Request parameters
Parameter | Details |
---|---|
inputRaster (Required) | The input utility raster from which the regions will be derived. The higher the value in the input raster, the greater the utility. The input raster can be either an integer or a floating-point type. Raster input examples:
|
outputName (Required) | The name of the output image service that will be created. You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter. Syntax: A JSON object describes the name of the output or the output raster. Output name example:
Output raster examples:
|
totalArea | The total amount of area for all regions. The default is 10 percent of the input cells within the processing extent. Example:
|
areaUnits | Defines the area units used for the Total area, Region minimum area, and Region maximum area parameters. Syntax: The input can be one of the following:
Example:
|
numberOfRegions | Determines how many regions the totalArea will be distributed across. The maximum number of regions that can be specified is 30. The default is 1. Example:
|
regionShape | Defines the shape characteristics for the output regions. Syntax: The input can be one of the following:
Example:
|
regionOrientation | Defines the orientation of the defined shape. Regions are grown out from the seed locations with preference given to the cells that maintain the desired orientation of the region shapes. The orientation values are in compass degrees ranging from 0 to 360, increasing clockwise starting from north. The default is 0. The default of 0 orients the shapes in the following manner: Circle-no effect; Ellipse-the minor axis is orientated north-south; Triangle and Pentagon-one point is straight up; Square, Hexagon, and Octagon-one flat side is oriented east-west. If the regionShape is set to Circle, this parameter is unavailable. Example:
|
shapeTradeoff | Identifies the weight for the cells when growing the candidate regions in the parameterized region-growing algorithm. The weighting is a tradeoff between a cell's contribution for maintaining the region shape relative to the utility contribution of the cell's attribute value. Higher values indicates maintaining the shape of the region is more important than selecting higher utility values. The acceptable percent values are 0 to 100, inclusively. The default is 50. This parameter is used to identify the feasible candidate regions. The candidate regions that will be selected by the algorithm are controlled by the evaluationMethod parameter. Example:
|
evaluationMethod | The evaluation criteria to be used for determining which of the candidate regions identified in the parameterized region-growing algorithm are most preferred. The preference can be specified based on a particular statistic of the utility values, or spatial arrangement of the cells within the regions. Syntax: The input can be one of the following:
Example:
|
minimumArea | Define the minimum area allowed for each region. The units specified by the areaUnits parameter will be used. Example:
|
maximumArea | Define the maximum area allowed for each region. The units specified by the areaUnits parameter will be used. Example:
|
minimumDistance | Define the minimum distance allowed between regions. No two regions can be within this distance. This parameter influences the parameterized region-growing (PRG) algorithm. If a cell has the potential of being added to a candidate region, but it is within this distance from any individual region in the dataset specified by the inExistingRegions parameter, in that at least one of the selected regions must be within the maximum distance from existing regions. The maximum distance setting is not applied to excluded areas (NoData cells) and has no effect on the PRG algorithm. The units specified by the distanceUnits parameter will be used. Example:
|
maximumDistance | Define the maximum distance allowed between regions. No region can be farther apart than this distance from at least one other region. When sequentially selecting regions, if the next best region is farther than this distance from any of the already selected regions, it will not be considered at this time, but it may be selected later when more regions are selected. The maximum distance is applied to the dataset specified in the inExistingRegions parameter, in that at least one of the selected regions must be within the maximum distance from existing regions. The maximum distance setting is not applied to excluded areas (NoData cells) and has no effect on the PRG algorithm. The units specified by the distanceUnits parameter will be used. Example:
|
distanceUnits | Defines the distance units that will be used for the Minimum distance between regions and Maximum distance between regions parameters. Syntax: The input can be one of the following:
Example:
|
inExistingRegions | A dataset identifying where regions already exist. The input can be a raster or feature dataset. If the input is a raster, any location in the raster with a valid value is considered already allocated. All other locations are set to NoData. In the parameterized region-growing algorithm, no region will grow from any location identified as an existing region. Existing regions will be used in the growth and evaluation of the minimumDistance and maximumDistance parameters as described in the corresponding parameter descriptions above. Input raster of existing regions example:
Input feature of existing regions example:
|
numberOfNeighbors | Defines which neighboring cells to use in the growth of the regions. Syntax: A String field that can be "FOUR" or "EIGHT". Example:
|
noIslands | Defines whether or not islands will be allowed within the potential regions. Syntax: A Boolean value as either true or false.
Example:
|
regionSeeds | Defines the number of seeds from which to grow the potential regions. Syntax: The input can be one of the following:
Example:
|
regionResolution | Sets the resolution at which region growth occurs. Syntax: The input can be one of the following:
Example:
|
selectionMethod | Identifies how the regions will be selected. Syntax: The input can be one of the following:
Example:
|
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>/LocateRegions/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>/LocateRegions/jobs/<jobId>/results/outputRaster
Example usage
Below is a sample request URL for LocateRegions.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/LocateRegions/submitJob
JSON Response syntax
The response returns the outputRaster output parameter, which has properties for parameter name, data type, and value. The content of value is always the output raster dataset itemId and the image service URL.
{
"paramName": <parameter name>,
"dataType": "GPString",
"value": {
"itemId": <item Id>,
"url": <URL>
}
}
JSON Response example
{
"paramName": "outRaster",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}