Skip To Content
ArcGIS Developer
Dashboard

Generate Multidimensional Anomaly

Description

Generate Multidimensional Anomaly diagram

The GenerateMultidimensionalAnomaly task is used to compute the anomaly for each slice in a multidimensional raster to generate a multidimensional raster. An anomaly is the deviation of an observation from its standard or mean value.

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

Request parameters

ParameterDetails
inputMultidimensionalRaster

(Required)

The portal folder ID, portal item ID, image service URL, cloud multidimensional raster dataset, or shared raster dataset that will be added to the image collection. At least one type of input needs to be provided in the JSON object.

Syntax: A JSON object describes the input multidimensional raster.


//Portal Folder ID
inputMultidimensionalRaster={"folderId": <portal folder id>}

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

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

//Cloud Raster UI or Shared Data Path
inputMultidimensionalRaster={"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 given to the service tool. 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 new hosted image service with the given service properties. The output hosted image service is stored in a raster store and shared on either the Raster Analysis Image Server or Image Hosting Image Server depending on the Enterprise configuration.

Syntax: JSON object describes the output multidimensional raster. At least one type of input needs to be provided in the JSON object. If multiple inputs are given. The itemid takes the priority.

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”: ”predicted_water_temp”, ”capabilities”:”image, metadata”}}
variables

(Optional)

The variable or variables that will be predicted in the analysis. If no variables are specified, all variables will be used.

Syntax: Either a string representing the variables, with multiple variables separated by comma, or list containing the variables.

Example

variables=["ceiling","cover"]
method

(Optional)

Specifies the method that will be used to calculate the anomaly. The default value, DIFFERENCE_FROM_MEAN, calculates the difference between a pixel's value and the mean of that pixel's values across slices defined by the interval. To calculate the percent difference between a pixel value and the mean of that pixel's value across slices defined by the interval, PERCENT_DIFFERENCE_FROM_MEAN should be selected. If PERCENT_OF_MEAN is used, the percent of the mean will be calculated. With Z_SCORE, the z-score for each pixel will be calculated. DIFFERENCE_FROM_MEDIAN calculates the difference between a pixel value and the mathematical medial of that pixel's values across slices defined by the interval. PERCENT_DIFFERENCE_FROM_MEDIAN calculates the percent difference between a pixel value and the mathematical median of that pixel's values across slices defined by the interval. If PERCENT_OF_MEDIAN is used, the percent of the mathematical median will be calculated.

Note:

A z-score of 0 indicates the pixel's value is identical to the mean. A z-score of 1 indicates the pixel's value is 1 standard deviation from the mean. If a z-score is 2, the pixel's value is 2 standard deviations from the mean, and so on.

Values: DIFFERENCE_FROM_MEAN | PERCENT_DIFFERENCE_FROM_MEAN | PERCENT_OF_MEAN | Z_SCORE | DIFFERENCE_FROM_MEDIAN | PERCENT_DIFFERENCE_FROM_MEDIAN | PERCENT_OF_MEDIAN

Syntax: A string representing the method.

Example

method="DIFFERENCE_FROM_MEAN"
calculationInterval

(Optional)

Specifies the temporal interval that will be used to calculate the mean: YEARLY calculates the yearly mean for each pixel; RECURRING_MONTHLY calculates the monthly mean for each; RECURRING_WEEKLY calculates the weekly mean; RECURRING_DAILY calculates the daily mean; HOURLY calculates the hourly mean; ALL calculates the mean across all slices for each pixel; and EXTERNAL_RASTER calculates based on an existing raster dataset that contains the mean or median value for each pixel that is referenced.

Values: ALL | YEARLY | RECURRING_MONTHLY | RECURRING_WEEKLY | RECURRING_DAILY | HOURLY | EXTERNAL_RASTER

referenceMeanRaster

Specifies the reference raster dataset that contains a previously calculated mean for each pixel. The anomalies will be calculated in comparison to this mean. At least one type of input must be provided in the JSON object. If multiple inputs are given, the itemId takes the priority.

Syntax: JSON object describes the input raster.

Example


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

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

//Cloud raster dataset or shared multidimensional raster dataset
{“uri”: <cloud raster uri or shared data path>}
ignoreNodata

(Optional)

Specifies whether NoData values are ignored in the analysis. If true, the analysis will include all valid pixels along the time dimension and ignore any NoData pixels. This is the default. If false, the analysis will result in NoData if there are any NoData values for the pixel along the time dimension.

Values: true | false

context

(Optional)

Contains additional settings that affect task execution. This task has the following settings:

  • Cell Size (cellSize)—The output raster will have the resolution specified by cell size.
  • 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.
  • Parallel Processing Factor (parallelProcessingFactor)—The specified number or percentage of processes will be used for the analysis.
  • Resampling Method (resamplingMethod)—Specifies the resampling method that will be used when creating the raster dataset for download.
    • NEAREST—The value of the closest cell will be used to assign a value to the output cell when resampling. This is the default.
    • BILINEAR—The new value of a cell will be based on a weighted distance average of the four nearest input cell centers.
    • CUBIC—The new value of a cell will be based on fitting a smooth curve through the 16 nearest input cell centers.
  • Snap Raster (snapRaster)—The output raster will have its cells aligned with the specified snap raster.

f

The response format. The default response format is html.

Values: html | json

Example usage

Below is a sample request URL for GenerateMultidimensionalAnomaly:

https://machine.domain.com/webadaptor/rest/services/System/RasterAnalysisTools/GPServer/GenerateMultidimensionalAnomaly?inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&
outputName={"serviceProperties": {"name":"watertemp_anomaly"}}&f=json

Below is a sample POST request for GenerateMultidimensionalAnomaly:


POST /webadaptor/rest/services/System/RasterAnalysisTools/GPServer/GenerateMultidimensionalAnomaly HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name": "watertemp_anomaly"}}&f=json

Both of the above requests use the following parameters and values in their requests:


inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}
outputName={"serviceProperties": {"name": "watertemp_anomaly"}}
f=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://<rasterAnalysisTools-url>/GenerateMultidimensionalAnomaly/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://<rasterAnalysisTools-url>/GenerateMultidimensionalAnomaly/jobs/<jobId>/results/result

JSON Response example

The response returns the results output parameter, which has properties for parameter name, data type, and value. The content of value is always the image service URL.


{ 
  "paramName": "outputMultidimensionalRaster",
  "dataType": "GPString",
  "value": { 
    "itemId": "c267610d0feb4370bf38cc6e2c4ac261",
    "url": "https://<servername>/arcgis/rest/services/Hosted/<servicename>/ImageServer" 
  } 
}

Related topics