Resampling most commonly occurs when changing the
coordinate system or projection of a dataset
to match another one, or to output it in a particular regional coordinate
system. For example, the SRTM elevation grids are produced in a latitude-longitude
coordinate system on the WGS84 datum; to map them into a State Plane coordinate
system, for example, on the NAD83 datum requires resampling.
Most often the aim is to preserve a similar cell size, although when
converting between latitude-longitude and linear systems there is always some
approximation because the lat-lon system does not have square cells in a linear
system. Even with the same cell size, however, there are orientation and location
differences of the two grids which make it necessary to use one or more values
from the source grid to determine an appropriate output value in the output grid.
Resampling is usually done one of 3 ways: nearest-neighbor,
in which the value of the most-overlapping cell is copied; bilinear interpolation,
in which the values of the 4 closest cells are averaged; and cubic convolution,
using the 16 nearest cells. Nearest-neighbor is used when categorical
data like land-use codes are being resampled, as it makes no sense to average them;
the other methods are used for continuous data like elevation.
It's important to note that resampling always involves some loss of fidelity,
either in position (pixel shifts in nearest-neighbor resampling) and/or in value
(the smoothing or extrapolating effects of bilinear and cubic methods); therefore,
data should be resampled as few times as possible during processing and mapping.