Available with ArcGIS Image for ArcGIS Online.

The Generate Trend Raster tool estimates the trend for each pixel along a dimension for one or more variables in a multidimensional imagery layer.

The output is a hosted imagery layer.

## Examples

The Generate Trend Raster tool can determine whether a seasonal trend is present in daily precipitation data that has been collected over 10 years by using the harmonic trend line option and examine the R-squared goodness of fit statistic.

The Generate Trend Raster tool can calculate the linear trend line for each pixel for over 40 years of monthly ocean temperature data to see where and how the temperature changed over time.

## Usage notes

Generate Trend Raster includes configurations for input layer, trend settings, and result layer.

### Input layer

The Input layer group includes the following parameters:

- Multidimensional or multiband imagery layer indicates which imagery layer will be analyzed. If there are no imagery layers available to be selected in the tool, a multidimensional imagery layer must be added to the map.
- Dimension indicates which statistic will be extracted. If the input raster is not a multidimensional raster, this parameter is not required.
- Variables indicates which variable will be aggregated along the selected dimension. If no variable is specified, all variables with the selected dimension will be aggregated.

### Trend settings

The Trend settings group includes the following parameters:

- Trend type indicates the type of analysis that will be performed on pixel values along a dimension.
There are three trend line options for fitting a trend to the variable values along a dimension: linear, harmonic, and polynomial. The three trend fitting options are described below. In addition to the line options, there are two options to determine whether the pixels in the multidimensional imagery layer have a statistically significant trend: Mann-Kendall and Seasonal Mann-Kendall.

- Linear—The linear trend line is a best-fit straight line that is used to estimate simple linear relationships. A linear trend highlights a rate of change that is increasing or decreasing at a steady rate. The formula for the linear trend line is as follows:
- y=The pixel's variable value
- x=The dimension value
- ß
_{0}=The y-intercept ß

_{1}=The linear slope or rate of changeß

ß_{1}>0 indicates an increasing trend_{1}<0 indicates a decreasing trend

- Harmonic—The harmonic trend line is a periodically repeating curved line that is best used to describe data that follows a cyclical pattern, such as seasonal temperature changes. The formula for the harmonic trend line is as follows:
- y=The pixel's variable value
- t=The Julian date
- ß
_{0}=The y-intercept - ß
_{1}=The rate of change - α, γ=Coefficients of inter-annual or intra-annual changes
- ω=i
- f=The harmonic frequency

- Polynomial—The polynomial trend line is a curved line that is useful for data that fluctuates. In this case, a polynomial order value is used to indicate the maximum number of fluctuations that occur. The formula for the polynomial trend line is as follows:
- y=The pixel's variable value
- x=The dimension value
- ß
_{0}, ß_{1}, ß_{2}, ß_{3}, ..., ß_{n}=Constant coefficients

Mann-Kendall—Pixels will be evaluated using the Mann-Kendall trend test.

The Mann-Kendall and Seasonal Mann-Kendall tests are used to determine whether there is a monotonic trend in the data. They are nonparametric, meaning they do not assume a specific distribution of data. The Mann-Kendall test does not consider serial correlation or seasonal effects. If the data is seasonal, the Seasonal Mann-Kendall test is more appropriate.- Seasonal-Kendall—Pixel values will be evaluated using the Seasonal Mann-Kendall trend test.

- Linear—The linear trend line is a best-fit straight line that is used to estimate simple linear relationships. A linear trend highlights a rate of change that is increasing or decreasing at a steady rate. The formula for the linear trend line is as follows:
- Length of cycle for harmonic trend analysis is used to indicate the number and length of cycles you expect to see in your data throughout a day or year. For example, if you expect your data to go through two cycles of variation in one year, the length of cycle will be 182.5 days or 0.5 years. If you have temperature data collected every three hours, and there is one cycle of variation per day, the length of cycle is one day.
- Cycle unit indicates the time unit that will be used for the length of the harmonic cycle.
- Frequency or polynomial order for harmonic trend analysis is used to describe the harmonic model to fit to the data. If the frequency is set to 1, a combination of linear and the first order harmonic curve will be used to fit the model. If the frequency is 2, a combination of linear, first order harmonic curve, and second order harmonic curve will be used to fit the data. If the frequency is 3, an additional third order harmonic curve will be used to model the data, and so on.
- Seasonal period indicates the time unit that will be used for the length of a seasonal period when using the Seasonal Mann-Kendall test.
- Model statistics specifies the statistics that will be calculated in the output. The Model statistics parameter options include the following:
- RMSE—Specifies whether the root mean square error (RMSE) of the trend fit line will be calculated. If selected, RMSE will be calculated and included as one of the bands of the trend imagery layer.
- R-squared—Specifies whether the R-squared goodness-of-fit statistic for the trend fit line will be calculated. If selected, the R-squared value will be calculated and included as one of the bands of the trend imagery layer.
- P-value of slope coefficient—Specifies whether the p-value statistic for the slope coefficient of the trend line will be calculated. If selected, the p-value will be calculated and included as one of the bands of the trend imagery layer.

- Ignore NoData indicates whether the missing values are ignored in the analysis or considered part of the analysis.

### Result layer

The Result layer group includes the following parameters:

- Output name determines the name of the layer that is created and added to the map. The name must be unique. If a layer with the same name already exists in your organization, the tool will fail and you will be prompted to use a different name.
- Output layer type specifies the type of raster output that will be created. The output can be either a tiled imagery layer or a dynamic imagery layer.
- Save in folder specifies the name of a folder in My Content where the result will be saved.

## Environments

Analysis environment settings are additional parameters that affect a tool's results. You can access the tool's analysis environment settings from the Environment settings parameter group.

This tool honors the following analysis environments:

- Output coordinate system
- Processing extent
##### Note:

The default processing extent in Map Viewer is Full extent. This default is different from Map Viewer Classic in which Use current map extent is enabled by default.

- Snap raster
- Cell size
- Resampling method

## Credits

This tool consumes credits.

Use Estimate credits to calculate the number of credits that will be required to run the tool. For more information, see Understand credits for spatial analysis.

## Outputs

This tool includes the following outputs:

One imagery layer that contains values that estimate the trend for all the pixels if a trend line option was selected.

For linear trend analysis, the output contains a three-band imagery layer, where:

- Band 1=Slope
- Band 2=Intercept
- Band 3=Root Mean Square Error (RMSE) or the error around the line of best fit

For Harmonic trend analysis, the number of bands in the output depends on the harmonic frequency. When the frequency is set to 1, the output is a five-band imagery layer as follows:

- Band 1=Slope
- Band 2=Intercept
- Band 3=Harmonic_sin1
- Band 4=Harmonic_cos1
- Band 5=RMSE

When the frequency is set to 2, the output is a seven-band imagery layer as follows:

- Band 1=Slope
- Band 2=Intercept
- Band 3=Harmonic_sin1
- Band 4=Harmonic_cos1
- Band 5=Harmonic_sin2
- Band 6=Harmonic_cos2
- Band 7=RMSE

For Polynomial trend analysis, the number of bands in the output depends on the polynomial order. Second order polynomial fitting produces a four-band imagery layer as follows:

- Band 1=Polynomial_2
- Band 2=Polynomial_1
- Band 3=Polynomial_0
- Band 4=RMSE

Third order polynomial fitting produces a five-band imagery layer as follows:

- Band 1=Polynomial_3
- Band 2=Polynomial_2
- Band 3=Polynomial_1
- Band 4=Polynomial_0
- Band 5=RMSE

If the tool is used to perform either the Mann-Kendall or Seasonal Mann-Kendall test, the output is a five-band imagery layer as follows:

- Band 1=Sen's slope
- Band 2=p-value
- Band 3=Mann-Kendall score (S)
- Band 4=S Variance
- Band 5=Z-score

## Licensing requirements

This tool requires the following licensing and configurations:

- Creator or GIS Professional user type
- Publisher, Facilitator, or Administrator role, or an equivalent custom role
- ArcGIS Image for ArcGIS Online

## Resources

Use the following resources to learn more:

- Generate Trend Raster in ArcGIS REST API
- generate_trend_raster in ArcGIS API for Python
- Generate Trend Raster in ArcGIS Pro