- URL:
- https://<rasteranalysistools-url>/ComputeChangeRaster
- Methods:
GET
- Version Introduced:
- 10.9.1
Description
The Compute
task is used to evaluate the difference between two input rasters, and generates a change raster output service. This tool supports continuous raster data and categorical raster data. When the raster inputs are two categorical rasters, the output change raster includes an attribute table containing all the permutations of the from and to classes as well as the pixel counts for all changed and unchanged classes.
Request parameters
Parameter | Details |
---|---|
(Required) | The portal item ID, image service URL, cloud raster dataset, or shared raster dataset representing the initial or earlier raster to be analyzed. Syntax: A JSON object describing the Example
|
(Required) | The portal item ID, image service URL, cloud raster dataset, or shared raster dataset representing the second or later raster to be analyzed. Syntax: A JSON object describing the Example
|
(Required) |
The name of the output image service that will be created. If the image service already exists, the portal item ID or service URL can be provided and the output path of the raster dataset generated in the raster store will be used to update the existing service definition. Otherwise, a new image service will be created. The service tool can also generate new hosted image service with the given service properties. The output hosted image service is stored in the raster store and shared on the image hosting ArcGIS Image Server or the raster analysis ArcGIS Image Server, depending on your configuration. Syntax: A JSON object describes the name of the output or the output raster. Example
|
| Specifies the type of calculation to perform between the two input rasters.
Syntax: String. Example:
|
| The class names from the Syntax: List of class name strings or a single string. Example:
|
| The class names from the Syntax: List of class name strings or a single string. Example:
|
| Specifies the pixels to be categorized in the output raster, if the
Syntax: String. Example:
|
| Specifies the color to use to symbolize the output classes, if the
Syntax: String. Example:
|
| A field that stores class names in the Syntax: A string representing the class name field in the Example:
|
| A field that stores class names in the Syntax: A string representing the class name field in the Example:
|
| Contains additional settings that affect task execution. This task has the following setting:
|
|
The response format. The default response format is html. Values: |
Response
When you submit a request, the task assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use job
to periodically review the status of the job and messages as described in Checking job status. Once the job has successfully completed, use job
to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis url>/ComputeChangeRaster/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:
http://<raster analysis url>/ComputeChangeRaster/jobs/<jobId>/results/outputRaster?token=<your token>&f=json
Example usage
Below is a sample request URL for Compute
.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/ComputeChangeRaster/submitJob
JSON Response example
The response returns the output
output parameter, which has properties for parameter name, data type, and value. The content of value
is always the output raster dataset item
and the image service URL.
{
"paramName": "outputRaster",
"dataType": "GPString",
"value": {
"itemId": "c267610d0feb4370bf38cc6e2c4ac261",
"url": "https://services.myserver.com/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}
Accessing results
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.
Access results
http://<raster analysis url>/ComputeChangeRaster/jobs/<jobId>/results/outputRaster?token=<your token>&f=json
Parameter | |
---|---|
| The output raster Example
The result has properties for parameter name, data type, and value. The content of the value is always the output raster dataset’s Result
|