Skip To Content ArcGIS for Developers Sign In Dashboard

Generate Trend Raster


Generate Trend Raster

The GenerateTrendRaster task allows you estimate the trend for each pixel along a dimension for one or more variables in a multidimensional raster.

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

Request parameters



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 needs to be provided in the JSON object. If multiple inputs are given, the itemId takes priority.

Syntax: A JSON object describes the input raster.

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



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 a new hosted image service with the given service properties. The output hosted image service is stored in 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. At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemId takes the priority.


Set “image, metadata” as image service capabilities to make sure the output image service can be recognized as multidimensional by other raster analysis tools.


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


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.




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 are separated by a comma, or a list containing the variables.




Specifies the type of line to be used to fit to the pixel values along a dimension.

  • LINEAR—Fits the pixel values for a variable along a linear trend line. This is the default.
  • POLYNOMIAL—Fits the pixel values for a variable along a second order polynomial trend line.
  • HARMONIC—Fits the pixel values for a variable along a harmonic trend line.

Syntax: A string of one of the keywords.




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.



Specifies whether NoData values are ignored in the analysis.

  • true—The analysis will include all valid pixels along the time dimension and ignore any NoData pixels. This is the default.
  • false—The analysis will result in NoData if there are any NoData values for the pixel along the time dimension.



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.


The response format. The default response format is html.

Values: html | json

Example usage

Below is a sample request URL for GenerateTrendRaster:{"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name": "temperature_trend"}}&dimension="StdTime"&f=json

Below is a sample POST request for GenerateTrendRaster:

POST /webadaptor/rest/services/System/RasterAnalysisTools/GPServer/GenerateTrendRaster HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: []

inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputName={"serviceProperties": {"name": "temperature_trend"}}&dimension="StdTime"&f=json

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

inputMultidimensionalRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&
outputName={"serviceProperties": {“name”:“temperature_trend”}}&


When you submit a request, the task assigns a unique job ID for the transaction.


{ "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:


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:


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"