Arithmetic function

The Arithmetic function performs an arithmetic operation between two rasters, or a raster and a scalar operation, and vice versa.

Notes

The following table illustrates the Extent Type options:

Input rastersExtent if FirstExtent if LastExtent if IntersectionExtent if Union

Input rasters

First extent

Last extent

Intersection extent

Union extent

The Operation options are as follows:

  • Plus—Outputs the sum of all the corresponding pixel values for each raster.
    output = Raster1 + Raster2
    Arithmetic function—Plus
  • Minus—Outputs the difference between the corresponding pixel values for each raster. This can be used to calculate change detection.
    output = Raster1 - Raster2
    Arithmetic function—Minus
  • Multiply—Outputs the product of the corresponding pixel values for each raster. This can be used to perform some cost functions.
    output = Raster1 × Raster2
    Arithmetic function—Multiply
  • Divide—Outputs the divisible result between the corresponding pixel values for each raster.
    output = Raster1 ÷ Raster2
  • Power—Outputs the product of the corresponding pixel values raised to the power of the input raster or scalar.
    output = Raster1Raster2
  • Modulus—Outputs the pixel value for the modulus of 2 rasters. For example, 17 % 5 = 2.

Parameters

ParameterDescription

Raster

The first input raster dataset.

Raster2

The second input raster dataset.

Operation

The arithmetic operation to be performed between the two input rasters.

The options are as follows:

  • Plus—Outputs the sum of all the corresponding pixel values for each raster. This is the default.
  • Minus—Outputs the difference between the corresponding pixel values for each raster. This can be used to calculate change detection.
  • Multiply—Outputs the product of the corresponding pixel values for each raster. This can be used to perform some cost functions.
  • Divide—Outputs the divisible result between the corresponding pixel values for each raster.
  • Power—Outputs the product of the corresponding pixel values raised to the power of the input raster or scalar.
  • Modulus—Calculates the modulus (%) using the 2 rasters. For example, 17 % 5 = 2.

Cellsize Type

Cellsize Type defines how the pixel cell size of the output will be computed when the input rasters have different pixel cell sizes.

The options are as follows:

  • First Of—Defines the output pixel cell size using the cell size of the first input raster.
  • Min Of—Defines the output pixel cell size using the minimum cell size of the input rasters.
  • Max Of—Defines the output pixel cell size using the maximum cell size of the input rasters. This is the default.
  • Mean Of—Defines the output pixel cell size using the mean (average) of both input rasters.
  • Last Of—Defines the output pixel cell size using the cell size of the last input raster.

Extent Type

Extent Type defines how the extent of the output will be computed when the input rasters have different extents.

The options are as follows:

  • First Of—Defines the output extent using the extent of the first input raster.
  • Intersection Of—Defines the output extent as the intersecting area of the input rasters. This is the default.
  • Union Of—Defines the output extent as the total extent of the input rasters.
  • Last Of—Defines the output extent using the extent of the last input raster.

In this topic
  1. Notes
  2. Parameters