Skip To Content

Resample function

The Resample function changes the cell size, resampling type, or both.

The Resample function should only be used with specific computing requirements; for example, when you are computing the wind or current magnitude-direction that requires resampling from the source resolution.

There are 11 resampling methods for this function:

  • Nearest Neighbor—Calculates pixel value using the nearest pixel. If no source pixel exists, then no new pixel can be created in the output.
  • Bilinear Interpolation—Calculates pixel value using the distance-weighted value of four nearest pixels.
  • Cubic Convolution—Calculates pixel value using the distance weighted value of sixteen nearest pixels.
  • Majority—Calculates pixel value using the majority pixel value in sixteen nearest pixels. If no source pixel exists, then no new pixel can be created in the output.
  • Bilinear Interpolation Plus—Uses Bilinear Interpolation, except the pixels along the edges are defined as NoData (since there are no surrounding pixels for an accurate calculation).
  • Gauss Blur—Applies a Gaussian convolution to the source raster and calculates pixel value using the distance-weighted value of four nearest pixels from the blurred raster.
  • Gauss Blur Plus—Uses Gauss Blur, except the pixels along the edges are defined as NoData (since there are no surrounding pixels for an accurate calculation).
  • Average—Calculates pixel values using the average value of all involved pixels, where the source pixels are covered by the target pixel.
  • Minimum—Calculates pixel value using the minimum value of all involved pixels. If no source pixel exists, then no new pixel can be created in the output.
  • Maximum—Calculates pixel value using the maximum value of all involved pixels. If no source pixel exists, then no new pixel can be created in the output.
  • Vector Average—Calculates vector average of magnitude-direction using all involved pixels. This method is only applicable for two band rasters that represent magnitude and direction. It first converts magnitude-direction into U-V, and then it takes the arithmetic average across all involved pixels to get the U-V of the target pixel and converts it back to magnitude-direction.

Cell Size—The cell size for the output raster. The cell size can be changed, but the extent of the raster dataset will remain the same. Resampling from a user-defined cell size can be much slower than the system default, since the system default resampling processes the minimum amount of data from the closest possible resolution.

Conversion between U-V and Magnitude-Direction

The two sections below show you the formula for the appropriate conversions. The variables are listed below:

  • u = vector-U
  • v = vector-V
  • m = magnitude
  • d = direction

Magnitude-Direction to U-V

u = m * cos (pi *d / 180)

v = m * sin (pi * d /180)

u-v to magnitude-direction

m = sqrt (u * u + v * v)

d = atan2 (v / u) * 180 / pi

Related topics