Gradient function

Available with Image Analyst license.

Overview

Calculates the gradient along X, Y, XY, or a given dimension.

Notes

The Gradient function works on a single band input. Use the Extract Bands function to specify the band. If the input is multiband, the first band will be used.

For multidimensional input that contains multiple variables, all variables will be processed. If a variable does not contain the specified Gradient Dimension parameter, it will be ignored. Use the Multidimensional Filter function to select the required variables.

The Multidimensional Filter function can also be used to define the dimension range for which the function is applied.

The table below has the equations for the various gradient calculations.

Gradient typeEquation

Gradient X

(right pixel - current pixel) / Denominator Unit

Gradient Y

(lower pixel - current pixel) / Denominator Unit

Gradient for a dimension

(next slice - current slice) / Denominator Unit

Parameters

ParameterDescription

Raster

The input multidimensional raster.

Gradient Dimension

The available dimensions that can be used to calculate the gradient.

For non-multidimensional input, available dimensions include X, Y, and XY.

For multidimensional input, available dimensions include X, Y, XY, and all dimensions available in the data. If there are two or more dimensions, the gradient will be calculated on the gradient dimension for all slices in the available dimensions.

The XY option outputs a 2-band raster, where band 1 represents the gradient along the X dimension, and band 2 represents the gradient along the Y dimension.

Denominator Unit

The unit of the gradient denominator, which depends on the selected Gradient Dimension.

The following are the options for X, Y, and XY:

  • Default—The output is the difference between adjacent pixels. This is the default.
  • Cellsize—The output is the difference between adjacent pixels divided by the pixel size of the input. The output unit is the same as the unit of the X/Y coordinates of the input. If the data is in a geographic coordinate system, it will be converted to meters.

The following are the options for StdTime:

  • Default—The output is the difference between adjacent slices. This is the default.
  • Per Hour—The output is the difference between adjacent slices divided by the difference between the time values and is converted to the per hour rate.
  • Per Day—The output is the difference between adjacent slices divided by the difference between their time values and is converted to the per day rate.
  • Per Month—The output is the difference between adjacent slices divided by the difference between their time values and is converted to the per month rate.
  • Per Year—The output is the difference between adjacent slices divided by the difference between their time values and is converted to the per year rate.
  • Per Decade—The output is the difference between adjacent slices divided by the difference between their time values and is converted to the per decade rate.

The following are the options for non-time dimensions:

  • Default—The output is the difference between adjacent slices. This is the default.
  • Dimension Interval—Output is the difference between adjacent slices divided by the difference between their dimension values.


In this topic
  1. Overview
  2. Notes
  3. Parameters