Skip To Content ArcGIS for Developers Sign In Dashboard

Predict Using Trend Raster

Description

Predict Using Trend Raster

The PredictUsingTrendRaster task is used to compute a forecasted multidimensional raster using the output trend raster from the Generate Trend Raster tool.

License:
As of 10.8, you must license your ArcGIS Server as an ArcGIS Image Server to use this resource.

Request parameters

ParameterDetails
inputMultidimensionalRaster

(Required)

The Portal Item ID, Image Service URL, cloud multidimensional raster dataset or shared multidimensional raster dataset. It must be a trend raster from the Generate Trend Raster tool.

Syntax: JSON object describes the input multidimensional trend raster.

Example

inputMultidimensionalRaster={"itemId": <portal item id>}
inputMultidimensionalRaster={“url”: <image service url>}
inputMultidimensionalRaster={“uri”: <cloud raster uri or shared data path>}

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

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.

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

outputName={"itemId": <portal item id>} 
outputName={“url”: <image service url>}
outputName={“uri”: <cloud raster uri or shared data path>}
or 
outputName={"serviceProperties": {"name": "predicted_water_temp", "capabilities": "image, metadata"}}

At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemid takes the priority.

variables

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 a list containing the variables.

Example

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

Specifies the method used to provide prediction dimension values.

  • BY_VALUE—The prediction will be calculated for a single dimension value or a list of dimension values defined by the dimensionValues parameter. This is the default. For example, you want to predict yearly precipitation for the years 2050, 2100, and 2150.
  • BY_INTERVAL—The prediction will be calculated for an interval of the dimension defined by a start and an end value. For example, you want to predict yearly precipitation for every year between 2050 and 2150.

Syntax: A string of one of the keywords.

Example

dimensionDefinition="BY_VALUE"
dimensionValues

The dimension value or values to be used in the prediction.

The format of the time, depth, and height values must match the format of the dimension values used to generate the trend raster. If the trend raster was generated for the StdTime dimension, the format should be YYYY-MM-DDTHH:MM:SS, for example 2050-01-01T00:00:00.

This parameter is required when the dimensionDefinition parameter is set to BY_VALUE.

Syntax: A list of dimension values.

Example

dimensionValues: ["2050-01-01T00:00:00","2100-01-01T00:00:00"]
start

The start date, height, or depth of the dimension interval to be used in the prediction. The format of the time, depth, and height values must match the format of the dimension values used to generate the trend raster. If the trend raster was generated for the StdTime dimension, the format should be YYYY-MM-DDTHH:MM:SS.

Syntax: A string representing the start value.

Example

start="2150-01-01T00:00:00"
end

The end date, height, or depth of the dimension interval to be used in the prediction. The format of the time, depth, and height values must match the format of the dimension values used to generate the trend raster. If the trend raster was generated for the StdTime dimension, the format should be YYYY-MM-DDTHH:MM:SS.

Syntax: A string representing the end value.

Example

end="2050-01-01T00:00:00"
intervalValue

The number of steps between two dimension values to be included in the prediction. The default value is 1. For example, to predict temperature values every five years, use a value of 5.

Syntax: A string representing the interval value.

Example

intervalValue="5"
intervalUnit

Specifies the unit that will be used for the value interval. This parameter only applies when the dimension of analysis is a time dimension.

  • HOURS—The prediction will be calculated for each hour in the range of time described by the start, end, and interval_value parameters.
  • DAYS—The prediction will be calculated for each day in the range of time described by the start, end, and interval_value parameters.
  • WEEKS—The prediction will be calculated for each week in the range of time described by the start, end, and interval_value parameters.
  • MONTHS—The prediction will be calculated for each month in the range of time described by the start, end, and interval_value parameters.
  • YEARS—The prediction will be calculated for each year in the range of time described by the start, end, and interval_value parameters.

Syntax: A string of one of the keywords.

Example

intervalUnit="YEARS"
context

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.

f

The response format. The default response format is html.

Values: html | json

Note:
The properties of rasterType set through this parameter can also be set through the aux_inputs parameter for the Add Rasters to Mosaic Datasets geoprocessing tool.

Example usage

The following is a sample request URL for PredictUsingTrendRaster:

https://machine.domain.com/webadaptor/rest/services/System/RasterAnalysisTools/GPServer/PredictUsingTrendRaster?inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name":"predict_op"}}&variables=[“temp”]&dimensionDefinition=BY_VALUE&dimensionValues=["2050-01-01T00:00:00","2100-01-01T00:00:00"]&f=json

The following is a sample POST request for PredictUsingTrendRaster:

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

inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name":"predict_op"}}&variables=["temp"]&dimensionDefinition=BY_VALUE&dimensionValues=["2050-01-01T00:00:00","2100-01-01T00:00:00"]&f=json

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

inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&
outputName={"serviceProperties": {"name":"predict_op"}}&
variables=[“temp”]&
dimensionDefinition=BY_VALUE&
dimensionValues=["2050-01-01T00:00:00","2100-01-01T00:00:00"]&
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 Checking 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>/PredictUsingTrendRaster/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>/PredictUsingTrendRaster/jobs/<jobId>/results/outputMultidimensionalRaster

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": "result",
  "dataType": "GPString",
  "value": {
		  "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
  }
}