b_spline

Luo_Suppe2026-08-15

gma.smc.interp.b_spline

function b_spline(points, values, bounds = None, resolution = None, weights = 0.1, crs = None, **kwargs):

Use B-Spline 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.

weights = float||list.

Rank-1 array of weights.

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

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

Returns:

Type: namedtuple.

Contains data (data) and affine transformation (geo_transform).

References.

[1] Dierckx P. An algorithm for surface fitting with spline functions Ima J. Numer. Anal. 1 (1981) 267-283..

[2] Dierckx P. An algorithm for surface fitting with spline functions report tw50, Dept. Computer Science,K.U.Leuven, 1980..

[3] Dierckx P. Curve and surface fitting with splines, Monographs on Numerical Analysis, Oxford University Press, 1993..


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