kriging

Luo_Suppe2026-08-15

gma.smc.interp.kriging

function kriging(points, values, bounds = None, resolution = None, search_radius = 12, crs = None, variogram_model = "Linear", variogram_parameters = None, method = "Ordinary", **kwargs):

Use Ordinary Kriging or Universal Kriging method to interpolate points into a 2D array.

Parameters:

points: list||tuple||array.

Interpolate point X (longitude), Y (latitude) coordinates. There must be at least 4 coordinate points.

For example: points = [(122.52, 52.97), (124.72, 52.35), (124.4, 51.67), (126.63, 51.73)]

values: array.

The data value corresponding to the coordinate point, which is the same as the number of points.

Optional:

bounds = tuple. Default None.

The four boundaries of the interpolation result are the minimum longitude (left), the minimum latitude (bottom), the maximum longitude (right), and the maximum latitude (top). The default (None) is to extract the range from the input coordinate points.

resolution = float. Default None.

The resolution of the interpolation result. The default (None) is 1/10 of the minimum bounds X and Y difference.

search_radius = int. Default 12.

Specifies the number of nearest input sample points to use to perform interpolation.

crs = str||int||aclassofgmaSpatialReference. Default None.

Coordinate system. Can be EPSG, WKT, Proj4, and other types of coordinate characters or SpatialReference class.

variogram_model = str. Default 'Linear'.

Semivariogram model.

variogram_parameters = dict. Default None.

Semivariate model parameters. By default, the least squares method is used to automatically calculate the variogram model parameters (None).

Supported models and configurable parameters include: 'Linear': 'Slope', 'Nugget' 'power': 'Scale', 'Exponent', 'Nugget' 'Gaussian': 'PSill', 'Range', 'Nugget' 'Spherical': 'PSill', 'Range', 'Nugget' 'Exponential': 'PSill', 'Range', 'Nugget' 'HoleEffect': 'PSill', 'Range', 'Nugget'

method = str. Default 'Ordinary'.

Kriging method. Include 'Ordinary' or 'Universal'.

**Other parameters(Effective when variogram_parameters = None).

n_lags = int. Default 6.

The mean number of bins for the semivariogram.

weight = bool. Default False.

Specifies whether the semivariance for smaller lags should be weighted.

Returns:

Type: namedtuple.

Contains data (data), variance at specified grid points or at the specified set of points (sigma_sq) and affine transformation (geo_transform).

References.

[1] P.K. Kitanidis, Introduction to Geostatistcs: ApplicationsinHydrogeology||CambridgeUniversityPress||1997(p272).

[2] N. Cressie, Statistics for spatial data, Wiley Series in Probability and Statistics, 1993(p137)..


Last Updated 8/15/2026, 8:42:21 AM