lk: Local Ordinary Kriging

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/lk.R


Function implements ANN based neighbor search, automatic variogram estimation and ordinary Kriging at query locations.


lk(query, obs, th, xcoord = "x", ycoord = "y", zcoord = "z",  vlen = 15, cl=NULL)



a data frame containing query spatial locations


a data frame containing spatial locations and observed data


a vector, distance threshold for neighbor search


a character constant, field name for x coordinate in both query and obs


a character constant, field name for y coordinate in both query and obs


a character constant, field name for data in obs


number of bins to compute local spatial variogram


a cluster object for multi-core computing (default number of cores in the PC minue one), 0 means single core


This function implements a local spatial Kriging method for spatial prediction using large data sets. At each location where prediction is required (termed as query point), a conservative distance threshold is used to select neighboring locations from the observed (or sample) data, which has XY coordinates.

A local variogram is used to estimate ordinary Kriging within this neighborhood.

Implementation of the local Kriging requires specifying a distance threshold (th). It is an upper bound within which spatial auto-correlation is believed to exist. The distance threshold may be obtained from variogram estimates or chosen based on prior knowledge of the underlying spatial process. For the given threshold, ANN tree is used to efficiently identify neighbors.

This function does not perform local kriging when the neighborhood contains less than five distinct spatial locations with observed data in the neighborhood. More data points are recommended for robust varioram estimation.

Four variogram models: Gaussian, exponential, spherical and Matern are automatically fit to the empirical variogram. The range parameter is estimated from the first distance lag where the empirical variogram exceeds 80

The estimated range parameter is used to reduce the neighborhood. Only initial neighbors that are spatially correlated with the process at the query point are used in prediction. In case the estimated range is small, indicating a locally weak spatial process, a sample of 10

Field names for geographic coordinates must match between query and observed data frames.


kriging prediction and standard deviation and quality flags.

krig predictive mean
sigma predictive standard error
Hs estimated range
nugget estimated nugget
psill estimated partial sill
model variogram model

where the variogram model are

1 Spherical
2 Gaussian
3 Exponential
4 Matern


Jun chen ( Jin Chen ( Naresh Kumar ( Dong Liang (

See Also

autoKrige in automap


out <- lk(ex1.grid[1:10,],,0.5,cl=0)

Example output

Loading required package: parallel

ltsk documentation built on Dec. 6, 2019, 1:07 a.m.