- URL:
- https://<rasteranalysistools-url>/GenerateTrendRaster
- Methods:
GET
- Version Introduced:
- 10.8
Description
The Generate
task allows you estimate the trend for each pixel along a dimension for one or more variables in a multidimensional raster.
Request parameters
Parameter | Details |
---|---|
(Required) | The portal folder ID, portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be added to the image collection. At least one type of input must be provided in the JSON object. If multiple inputs are provided, the Syntax: A JSON object describes the input raster.
|
(Required) | The output hosted image service properties. If there is an existing hosted image service, you can provide the portal item ID or service URL. 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 service properties provided. The output hosted image service is stored in the raster store and is shared on either the Raster Analysis Image Server or the Image Hosting Image Server depending on the enterprise configuration. Syntax: A JSON object describes the output multidimensional raster. At least one type of input must be provided in the JSON object. If multiple inputs are provided, the Example
|
(Required) | The dimension along which a trend will be extracted for the variable or variables selected in the analysis. Syntax: A string representing the dimension name. Example
|
(Optional) | The variable or variables for which trends will be calculated. If no variable is specified, the first variable in the multidimensional raster will be analyzed. Syntax: Either a string representing the variables, with multiple variables separated by a comma, or a list containing the variables. Example
|
| Specifies the type of line to be used to fit to the pixel values along a dimension.
Values: |
| The length of periodic variation to model. This parameter is required when Syntax: Double value Example
|
| Specifies either days ( Values: |
(Optional) | If the |
(Optional) | Specifies whether Values: |
| Specifies whether the root mean square error (RMSE) of the trend fit line will be calculated. If Values: |
| Specifies whether the R-squared goodness-of-fit statistic for the trend fit line will be calculated. If Values: |
| Specifies whether the p-value statistic for the slope coefficient of the trend line will be calculated. If Values: |
| Specifies the time unit to be used for the length of a seasonal period when performing the Seasonal-Kendall test.
Values: |
(Optional) | Contains additional settings that affect task execution. This parameter has the following settings:
|
|
The response format. The default response format is html. Values: |
Example usage
The following is a sample request URL for Generate
:
https://machine.domain.com/webadaptor/rest/services/System/RasterAnalysisTools/GPServer/GenerateTrendRaster?inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name": "temperature_trend"}}&dimension="StdTime"&f=json
The following is a sample POST request for Generate
:
POST /webadaptor/rest/services/System/RasterAnalysisTools/GPServer/GenerateTrendRaster HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name": "temperature_trend"}}&dimension="StdTime"&f=json
Both examples above use the following parameters and values in their requests:
inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&
outputName={"serviceProperties": {“name”:“temperature_trend”}}&
dimension="StdTime"&
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>/GenerateTrendRaster/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>/GenerateTrendRaster/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": "result",
"dataType": "GPString",
"value": {
"url": "https://machine.domain.com/webadaptor/rest/services/Hosted/<service name>/ImageServer"
}
}