Disponible con licencia de Image Analyst.
- URL:https://<rasteranalysistools-url>/GenerateTrendRaster
- Version Introduced:10.8
Description
The GenerateTrendRaster task allows you estimate the trend for each pixel along a dimension for one or more variables in a multidimensional raster.
Licencia:
You must license your ArcGIS Server as an ArcGIS Image Server to use this resource.Request parameters
Parameter | Details |
---|---|
inputMultidimensionalRaster (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 itemId takes priority. Syntax: A JSON object describes the input raster.
|
outputName (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 itemId takes priority. Nota:Set “image, metadata” as image service capabilities to ensure that the output image service can be recognized as multidimensional by other raster analysis tools. Example
|
dimension (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
|
variables (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
|
trendLineType | Specifies the type of line to be used to fit to the pixel values along a dimension.
Values: LINEAR | POLYNOMIAL | HARMONIC | MANN-KENDALL | SEASONAL-KENDALL |
cycleLength | The length of periodic variation to model. This parameter is required when trendLineType is set to HARMONIC. For example, leaf greenness often has one strong cycle of variation in a single year, so the cycle length is 1 year. Hourly temperature data has one strong cycle of variation throughout a single day, so the cycle length is 1 day. The default is null. Syntax: Double value Example
|
cycleUnit | Specifies either days (DAYS) or years (YEARS) as the unit to be used for the length of the harmonic cycle. YEARS is the default value. Values: DAYS | YEARS |
frequency (Optional) | If the trendLineType parameter is HARMONIC, the default value is 1, or one harmonic cycle per year. If the trendLineType parameter is POLYNOMIAL, the default value is 2, or second order polynomial. |
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 pixels along the time dimension. Values: true | false |
RMSE | Specifies whether the root mean square error (RMSE) of the trend fit line will be calculated. If true, the RMSE will be calculated and included as one of the bands of trend raster. This is the default. If false, the RMSE will not be calculated. Values: true | false |
R2 | Specifies whether the R-squared goodness-of-fit statistic for the trend fit line will be calculated. If true, the R-squared value will be calculated and included as one of the bands of trend raster. If false, the R-squared value will not be calculated. This is the default. Values: true | false |
slopePValue | Specifies whether the p-value statistic for the slope coefficient of the trend line will be calculated. If true, the p-value will be calculated and included as one of the bands of trend raster. If false, the p-value will not be calculated. This is the default. Values: true | false |
seasonalPeriod | Specifies the time unit to be used for the length of a seasonal period when performing the Seasonal-Kendall test.
Values: DAYS | MONTHS |
context (Optional) | Contains additional settings that affect task execution. This parameter has the following settings:
|
f | The response format. The default response format is html. Values: html | json |
Example usage
The following is a sample request URL for GenerateTrendRaster:
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 GenerateTrendRaster:
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 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>/GenerateTrendRaster/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>/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"
}
}