Kriging interpolation
kriging(data, target_column, resolution, extent=None, variogram_model='linear', coordinates_type='geographic', method='ordinary')
Perform Kriging interpolation on the input data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
GeoDataFrame
|
GeoDataFrame containing the input data. |
required |
target_column |
str
|
The column name with values for each geometry. |
required |
resolution |
Tuple[Number, Number]
|
The resolution i.e. cell size of the output raster as (pixel_size_x, pixel_size_y). |
required |
extent |
Optional[Tuple[Number, Number, Number, Number]]
|
The extent of the output raster as (x_min, x_max, y_min, y_max). If None, calculate extent from the input vector data. |
None
|
variogram_model |
Literal[linear, power, gaussian, spherical, exponential]
|
Variogram model to be used. Either 'linear', 'power', 'gaussian', 'spherical' or 'exponential'. Defaults to 'linear'. |
'linear'
|
coordinates_type |
Literal[euclidean, geographic]
|
Determines are coordinates on a plane ('euclidean') or a sphere ('geographic'). Used only in ordinary kriging. Defaults to 'geographic'. |
'geographic'
|
method |
Literal[ordinary, universal]
|
Ordinary or universal kriging. Defaults to 'ordinary'. |
'ordinary'
|
Returns:
Type | Description |
---|---|
Tuple[ndarray, dict]
|
Grid containing the interpolated values and metadata. |
Raises:
Type | Description |
---|---|
EmptyDataFrameException
|
The input GeoDataFrame is empty. |
InvalidParameterValueException
|
Target column name is invalid or resolution is not greater than zero. |
Source code in eis_toolkit/vector_processing/kriging_interpolation.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|