Kriging

Algorithm

Kriging can be seen as a point interpolation which requires a point map as input and returns a raster map with estimations and optionally an error map.

The estimations or predictions are calculated as weighted averages of known input point values, similar to the Moving Average operation.

  

The estimate to be calculated, i.e. an output pixel value , is a linear combination of weight factors (wi) and known input point values (Zi):
= S(wi * Zi)

In case the value of an output pixel would only depend on 3 input points, this would read:
= w1 * Z1 + w2 * Z2 + w3 * Z3

Thus, to calculate one output pixel value , first, three weight factors w1, w2, w3 have to be found (one for each input point value Z1, Z2, Z3), then, these weight factors can be multiplied with the corresponding input point values, and summed.

In Moving average, the weight factors are simply determined by the distances of the input points towards an output pixel. In Kriging, however, the weight factors are calculated by finding the semi-variogram values for all distances between input points and by finding semi-variogram values for all distances between an output pixel and all input points; then a set of simultaneous equations has to be solved. When the spherical distance option is used, distances are calculated over the sphere using the projection of the coordinate system that is used by the georeference of the output raster map.

All semi-variogram values are calculated by using a user-specified semi-variogram model (based on the output of the Spatial correlation operation). The weight factors are calculated in such a way that the estimation error in each output pixel is minimized.

The optional error map contains the standard errors of the estimates.

Process Simple Kriging:

  1. Find the valid input points:
  2.   

  3. Determine the distances between all valid input points (n) and find the semi-variogram value for these distances:
  4.   

  5. For the first output pixel, determine the distances of this pixel towards all input points, and find the semi-variogram value for these distances:
  6.   

  7. Calculate the weight factors (vector w):
  8. The obtained weight factors apply to the current output pixel only.

      

  9. Calculate the estimated or predicted values for this output pixel:
  10.   

  11. Optionally, calculate the error variance and standard error for this output pixel:
  12.   

  13. Consider the next output pixel and repeat steps 3-7, until all output pixels are done.

Ordinary Kriging:

  1. Find the valid input points:
  2.   

  3. For the first output pixel, determine the input points (n) which will make a contribution to the output value depending on the specified limiting distance and minimum and maximum number of points:
  4.   

  5. Determine the distances between all input points that will make a contribution to this output pixel (result of step 2), and find the semi-variogram value for these distances.
  6.   

  7. Determine the distances of this output pixel towards all input points, and find the semi-variogram value for these distances:
  8.   

  9. Calculate the weight factors (vector w):
  10. The obtained weight factors apply to the current output pixel only.

      

  11. Calculate the estimated or predicted values for this output pixel:
  12.   

  13. Optionally, calculate the error variance and standard error for this output pixel:
  14.   

  15. Consider the next output pixel and repeat steps 2-8, until all output pixels are done.

Formulae to calculate weight factors:

The Kriging weight factors of n valid input points i (i = 1, ..., n) are found by solving the following matrix equation:

  

[ C ]

*

[ w ]

=

[ D ]

(1)

  

This matrix equation can be written as a set of n +1 simultaneous equations:

  

Si ( wi * g (hik) ) + l = g (hpi)

for k = 1, ..., n

(2)

Si wi = 1

(3)

where:

hik

is the distance between input point i and input point k

hpi

is the distance between the output pixel p and input point i

g(hik)

is the value of the semi-variogram model for the distance hik, i.e. the semi-variogram value for the distance between input points i and input point k

g(hpi)

is the value of the semi-variogram model for the distance hpi , i.e. the semi-variogram value for the distance between the output pixel p and input point i

wi

is a weight factor for input point i

l

is a Lagrange multiplier, used to minimize possible estimation error

Matrix C thus contains the semi-variogram values for all combinations of valid input points that will make a contribution to the output pixel value.

Vector w thus contains the weight factors for all valid input points that will make a contribution to the output pixel value.

Vector D thus contains the semi-variogram for an output pixel and all combinations of valid input points.

Equation (3) guarantees unbiasedness of the estimates. The solutions wi minimize the Kriging error variance s2.

Formulae to calculate an estimate or predicted value for an output pixel:

= Si (wi * Zi)

(4)

where:

is the estimate or predicted value for one output pixel to be calculated

wi

is the weight factor for input point i

Zi

is the value of input point i

Formulae to calculate error variance and standard error:

The error variance is calculated as:

  

s2 = Si ( wi * g (hpi)) + l

(5a)

The standard error or standard deviation is the square root of the error variance, thus:

  

s = Ö ( Si ( wi * g (hpi)) + l )

(5b)

where:

s2

is the error variance for the output pixel estimate

s

is he standard error or the standard deviation of the output pixel estimate

hpi

is the distance between the output pixel p and input point i

g (hpi)

is the value of the semi-variogram model for the distance hpi , i.e. the semi-variogram value for the distance between the output pixel p and input point i

wi

is a weight factor for input point i

l

is a Lagrange multiplier, used to minimize possible estimation error

Notes:

  1. The contents of matrix C depends on the semi-variogram model selected by the user, its parameters nugget, sill and range, and the geometric distribution of the points within the limiting circle in the input map.
  2. The contents of vector D is determined by the location of the estimated pixel value with respect to the surrounding input points (inside the limiting circle) and the semi-variogram.
  3. The estimates are computed as linear combinations of the n point sample values with the weights wi as coefficients (the wi are found from equation (1)). Therefore the estimates are called 'linear predictors'.
  4. Equation (3) guarantees unbiasedness of the estimates. The solutions wi minimize the Kriging error variance s2.
  5. Equation (5) does not contain the sample attribute information. This means that the error variances solely depend on the spatial distribution of the samples and not on their measurement values (the attribute values).
  6. In the case of Simple Kriging, it is assumed that all input points contribute in some way to the estimate in each pixel. The Kriging matrix has thus a constant value for all pixels estimated and needs to be inverted only once; however the right hand-side D keeps changing.
  7. In Ordinary Kriging the number of points used (n <= N) and hence the size of the Kriging matrix (n+1) will change from pixel to pixel while calculating the output map(s). Hence it is theoretically possible that for each output pixel a new Kriging system of order n+1 has to be solved. The algorithm also takes care that for each new set of surrounding input points, this set is sorted according to distance from the estimated pixel in order to enable to select the closest points satisfying the max nr of points condition.

References:

See also: