- URL:
- https://<rasteranalysistools-url>/PredictUsingTrendRaster
- Methods:
GET
- Version Introduced:
- 10.8
Description
The Predict
task is used to compute a forecasted multidimensional raster using the output trend raster from the Generate Trend Raster tool.
Request parameters
Parameter | Details |
---|---|
(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
At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the |
(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
At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the |
| 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
|
| Specifies the method used to provide prediction dimension values.
Syntax: A string of one of the keywords. Example
|
| 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 Syntax: A list of dimension values. Example
|
| 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 Syntax: A string representing the start value. Example
|
| 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 Syntax: A string representing the end value. Example
|
| 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
|
| Specifies the unit that will be used for the value interval. This parameter only applies when the dimension of analysis is a time dimension.
Syntax: A string of one of the keywords. Example
|
| Contains additional settings that affect task execution. This task has the following settings:
|
|
The response format. The default response format is html. Values: |
Example usage
The following is a sample request URL for Predict
:
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 Predict
:
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 job
to periodically check the status of the job and messages, as described in Check job status. Once the job has successfully completed, use the job
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 esri
, 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"
}
}