Predict Using Trend Raster

URL:
https://<rasteranalysistools-url>/PredictUsingTrendRaster
Methods:
GET
Version Introduced:
10.8

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.

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

Use dark colors for code blocksCopy
1
2
3
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.

Example

Use dark colors for code blocksCopy
1
2
3
4
5
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

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
intervalUnit="YEARS"

context

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.

  • Mask (mask )—Only cells that fall within the analysis mask will be considered in the operation.

  • 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

The following is a sample request URL for PredictUsingTrendRaster :

Use dark colors for code blocksCopy
1
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 :

Use dark colors for code blocksCopy
1
2
3
4
5
6
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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
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:

Use dark colors for code blocksCopy
1
{ "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:

Use dark colors for code blocksCopy
1
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:

Use dark colors for code blocksCopy
1
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.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "paramName": "result",
  "dataType": "GPString",
  "value": {
		  "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.