IDW
idw(geodataframe, target_column, raster_profile, power=2)
Calculate inverse distance weighted (IDW) interpolation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geodataframe |
GeoDataFrame
|
The vector dataframe to be interpolated. |
required |
target_column |
str
|
The column name with values for each geometry. |
required |
raster_profile |
Union[Profile, dict]
|
The raster profile used for output grid properties. Needs to include at least crs, transform, width and height. |
required |
power |
Number
|
The value for determining the rate at which the weights decrease. As power increases, the weights for distant points decrease rapidly. Defaults to 2. |
2
|
Returns:
Type | Description |
---|---|
ndarray
|
Numpy array containing the interpolated values. |
Raises:
Type | Description |
---|---|
EmptyDataFrameException
|
The input GeoDataFrame is empty. |
InvalidParameterValueException
|
Invalid resolution or target_column. |
NonMatchingCrsException
|
The input GeoDataFrame and raster profile have mismatching CRS. |
Source code in eis_toolkit/vector_processing/idw_interpolation.py
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 |
|