Skip To Content
ArcGIS Developers
Dashboard

Detect Change Using Change Analysis Raster

Description

Detect Change Using Change Analysis Raster

The DetectChangeUsingChangeAnalysisRaster task generates a raster containing pixel change information using the output change analysis raster from the AnalyzeChangesUsingCCDC task or the AnalyzeChangesUsingLandTrendr task.

License:
You must license your ArcGIS Server as an ArcGIS Image Server to use this resource.

Request parameters

ParameterDetails
inputChangeAnalysisRaster

(Required)

The portal item ID, image service URL, cloud multidimensional raster dataset, or shared multidimensional raster dataset generated from the AnalyzeChangesUsingCCDC task or AnalyzeChangesUsingLandTrendr task. At least one type of input must be provided in the JSON object. If multiple inputs are given, the itemid takes the priority.

Syntax: A JSON object describes the input change analysis raster.

Example:

//Portal Item ID
inputChangeAnalysisRaster={"itemId": <portal item id>} 

//Image Service URL
inputChangeAnalysisRaster={"url": <image service url>}

//Cloud Raster URI or Shared Data Path
inputChangeAnalysisRaster={"uri": <cloud raster uri or shared data path>}
outputName

(Required)

Output hosted image service properties. If the hosted image service is already created, the portal item ID or service URL can be provided, and the output path of the multidimensional raster dataset generated in the raster store will be used to update the existing service definition. The service tool can also generate a new hosted image service with the given service properties.

Note:

Set image,metadata as image service capabilities to make sure the output image service can be recognized as multidimensional by other raster analysis tools.

Example:

//Portal Item ID
outputName={"itemId": <portal item id>}

//Image Service URL
outputName={“url”: <image service url>}

//Cloud Raster URI or Shared Data Path
outputName={“uri”: <cloud raster uri or shared data path>}

//Service properties
outputName={"serviceProperties": {"name": "Landsat_LandTrendr", "capabilities": "image, metadata"}}

changeType

(Required)

Specifies the change information to calculate.

  • TIME_OF_LATEST_CHANGE—Each pixel will contain the date of the most recent change for that pixel in the time series. This is the default.
  • TIME_OF_EARLIEST_CHANGE—Each pixel will contain the date of the earliest change for that pixel in the time series.
  • TIME_OF_LARGEST_CHANGE—Each pixel will contain the date of the most significant change for that pixel in the time series.
  • NUM_OF_CHANGES—Each pixel will contain the total number of times the pixel changed in the time series.
In addition to the options above, the following options are only available when the inputChangeAnalysisRaster was generated by the AnalyzeChangesUsingLandTrendr task:
  • TIME_OF_LONGEST_CHANGE—Each pixel will contain the date of change at the end of the longest transition segment in the time series.
  • TIME_OF_SHORTEST_CHANGE—Each pixel will contain the date of change at the end of the shortest transition segment in the time series.
  • TIME_OF_FASTEST_CHANGE—Each pixel will contain the date of change at the end of the transition that occurred most quickly.
  • TIME_OF_SLOWEST_CHANGE—Each pixel will contain the date of change at the end of the transition that occurred most slowly.

Syntax: String

Example:

changeType="TIME_OF_LATEST_CHANGE"
maxNumberOfChanges

(Optional)

The maximum number of changes per pixel that will be calculated. This number corresponds to the number of bands in the output raster. The default is 1, meaning only one change date will be calculated and the output will contain one band.

This parameter is not available when the changeType parameter is set to NUM_OF_CHANGES.

Example:

maxNumberOfChanges=3
segmentDate

(Optional)

Specifies whether to extract the date at the beginning of a change segment or the end. This parameter is available only when the inputChangeAnalysisRaster was generated by the AnalyzeChangesUsingLandTrendr task.

  • BEGINNING_OF_SEGMENT—Extract the date at the beginning of a change segment. This is the default.
  • END_OF_SEGMENT—Extract the date at the end of a change segment.

Syntax: String

Example:

segmentDate="BEGINNING_OF_SEGMENT"
changeDirection

(Optional)

The direction of change to be included in the analysis. For example, set this parameter to INCREASE to extract date of change information for periods where the change is in the positive or increasing direction. This parameter is available only when the inputChangeAnalysisRaster was generated by the AnalyzeChangesUsingLandTrendr task.

  • ALL—All change directions will be included in the output. This is the default.
  • INCREASE—Only change in the positive or increasing direction will be included in the output.
  • DECREASE—Only change in the negative or decreasing direction will be included in the output.

Syntax: String

Example:

changeDirection="INCREASE"
filterByYear

(Optional)

Specifies whether to filter by a range of years. When set to true, results will be filtered such that only changes that occurred within a specific range of years are included in the output. When set to false, results will not be filtered by year. This is the default.

Values: true | false

minYear

(Optional)

The earliest year to use to filter results. This parameter is required when the filterByYear parameter is set to true.

Syntax: Long integer

Example:

minYear=2001
maxYear

(Optional)

The latest year to use to filter results. This parameter is required when the filterByYear parameter is set to true.

Syntax: Long integer

Example:

minYear=2020
filterByDuration

(Optional)

Specifies whether to filter by the duration of change. When set to true, results will be filtered such that only changes that last a given amount of time are included in the output. When set to false, results will not be filtered by change duration. This is the default.

This parameter is available only when the inputChangeAnalysisRaster was generated by the AnalyzeChangesUsingLandTrendr task.

Values: true | false

minDuration

(Optional)

The minimum number of consecutive years to include in the results. This parameter is required if the filterByDuration parameter is set to true.

Syntax: Double

Example:

minDuration=2
maxDuration

(Optional)

The maximum number of consecutive years to include in the results. This parameter is required if the filterByDuration parameter is set to true.

Syntax: Double

Example:

maxDuration=4
filterByMagnitude

(Optional)

Specifies whether to filter by the magnitude of change. When set to true, results will be filtered such that only changes of a given magnitude are included in the output. When set to false, results will not be filtered by magnitude. This is the default.

Values: true | false

minMagnitude

(Optional)

The minimum change magnitude to include in the results. This parameter is required if the filterByMagnitude parameter is set to true.

Syntax: Double

Example:

minMagnitude=0.25
maxMagnitude

(Optional)

The maximum change magnitude to include in the results. This parameter is required if the filterByMagnitude parameter is set to true.

Syntax: Double

Example:

maxMagnitude=1.5
filterByStartValue

(Optional)

Specifies whether to filter by the starting value of a variable, at the beginning of a change. When set to true, results will be filtered such that only changes that start at a given value are included in the output. When set to false, results will not be filtered by start value. This is the default.

This parameter is available only when the inputChangeAnalysisRaster was generated by the AnalyzeChangesUsingLandTrendr task.

Values: true | false

minStartValue

(Optional)

The minimum value that defines the range of the start value. This parameter is required if the filterByStartValue parameter is set to true.

Syntax: Double

Example:

minStartValue=0.75
maxStartValue

(Optional)

The maximum value that defines the range of the start value. This parameter is required if the filterByStartValue parameter is set to true.

Syntax: Double

Example:

maxStartValue=0.95
filterByEndValue

(Optional)

Specifies whether to filter by the ending value of a variable, at the end of a change. When set to true, results will be filtered such that only changes that end at a given value are included in the output. When set to false, results will not be filtered by end value. This is the default.

This parameter is available only when the inputChangeAnalysisRaster was generated by the AnalyzeChangesUsingLandTrendr task.

Values: true | false

minEndValue

(Optional)

The minimum value that defines the range of the end value. This parameter is required if the filterByEndValue parameter is set to true.

Syntax: Double

Example:

minEndValue=-0.12
maxEndValue

(Optional)

The maximum value that defines the range of the end value. This parameter is required if the filterByEndValue parameter is set to true.

Syntax: Double

Example:

maxEndValue=0.35
context

(Optional)

Contains additional settings that affect task execution. 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.
  • Parallel Processing Factor (parallelProcessingFactor)—The specified number or percentage of processes will be used for the analysis.

Example:

context={"cellSize": "20", "parallelProcessingFactor": "4"}
f

The response format. The default response format is html.

Values: html | json

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 the jobId to periodically check the status of the job and messages, as described in Check job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

https://<analysis-url>/DetectChangeUsingChangeAnalysisRaster/jobs/<jobId>

Accessing results

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

https://<raster analysis url>/DetectChangeUsingChangeAnalysisRaster/jobs/<jobId>/results/outputRaster?token=<your token>&f=json

ParameterDescription
outputRaster

The output multidimensional raster itemId and URL:

Example:

{"url": "https://rasteranalysis-url>/DetectChangeUsingChangeAnalysisRaster/jobs/<jobId>/results/outputMultidimensionalRaster"}
{"url":
"http://<raster analysis url>/DetectChangeUsingChangeAnalysisRaster/jobs/<jobId>/results/outputRaster"}

The result has properties for parameter name, data type, and value. The content of the value is always the output raster dataset's itemId and image service URL.

{
 "paramName": "outputRaster",
 "dataType": "GPString",
 "value": {
  "itemId": "c267610d0feb4370bf38cc6e2c4ac261",
  "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
 }
}