Spatial interpolation is the process of interpolating (or extrapolating) to gridded points from the irregularly spaced observation gages. Currently there are 4 methods for spatial interpolation: Nearest Neighbor, Bilinear, Inverse Distance Weighting and Inverse Distance Squared Weighting. Each of these methods is described below.

Nearest Neighbor

When computing the value for each grid cell in the output grid, nearest neighbor interpolation finds the closest gage to each grid cell, and assigns the values from that gage to the grid cell. This makes Nearest Neighbor interpolation the simplest of the spatial interpolation techniques, as it simply selects the geographically closest value.

Bilinear

Bilinear interpolation relies on forming a TIN with the gage network, and interpolating to grid cell centroids from the three points forming a triangle around that grid cell centroid. Interpolation within the triangle is performed using Barycentric Coordinates. Formation of TINs is described in Reading Data.

Inverse Distance Weighting

Inverse distance weighting computes a weight for each gage contributing to a grid cell value. Weights are computed below:

w_{cell,gage}=\frac{1}{\sqrt{(X_{cell}-X_{gage})^2+(Y_{cell}-Y_{gage})^2}}

In the above equation w_{cell,gage}is the raw weight for a single gage contributing to a cell. X_{cell} and Y_{cell} are the x and y coordinates of the cell centroid, and X_{gage} and Y_{gage} are the x and y coordinates of the gage. Note that all coordinates are in the output coordinate system. After computing the weights, they are normalized for each cell as follows:

w_{cell,gage}=\frac{w_{cell,gage}}{\sum_{gage=1}^{N_{gage}}w_{cell,gage}}

After weighting, the value of the cell is equal to the equation below:

z_{cell}=\sum_{gage=1}^{N_{gage}}w_{cell,gage}*z_{gage}

z_{cell} is the value for the target cell and z_{gage} is the value for a gage.

Inverse Distance Squared Weighting

Inverse distance squared weighting is nearly identical to inverse distance weighting, except the raw weighting function does not require the square root. The raw weight is shown below:

w_{cell,gage}=\frac{1}{(X_{cell}-X_{gage})^2+(Y_{cell}-Y_{gage})^2}