Inverse-Distance🍋
IDW
🍋
Bases: Entity
Inverse Distance Weighting Solver class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metric
|
Metric
|
Metric used for distance computation. |
required |
power
|
int
|
Power used for distance computation. Defaults to 1. |
1
|
neighbors_number
|
Optional[int]
|
Number of neighbors taken for weighting. Defaults to None. |
None
|
axes
|
List[Coord]
|
If solver is 2D or 3D. Defaults to [Coord.U, Coord.V, Coord.W]. |
[U, V, W]
|
Attributes:
Name | Type | Description |
---|---|---|
metric |
Metric
|
Metric used for distance computation. |
power |
int
|
Power used for distance computation. Default is L1 norm. |
neighbors_number |
int
|
Number of neighbors taken for weighting. |
axes |
List[Coord]
|
If solver is 2D or 3D. |
axes: List[Coord]
property
🍋
neighbors_number: int
property
🍋
solve(obj, obj_region, obj_attribute, support, support_region, support_attribute)
🍋
Solve IDW on a support using a conditioning object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
GeoRefObject
|
Conditioning Object. |
required |
obj_region
|
Optional[str]
|
Spatial subset of conditioning. |
required |
obj_attribute
|
str
|
Property to estimate. |
required |
support
|
GeoRefObject
|
Object to estimate onto. |
required |
support_region
|
Optional[str]
|
Spatial subset of estimation. |
required |
support_attribute
|
str
|
Property name to add in support. |
required |
solve_api(metric, dim, obj_coords, obj_data, support_coords, power=1, neighbors_number=None)
staticmethod
🍋
Low-level IDW solving method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metric
|
Metric
|
Metric used for distance computation. |
required |
dim
|
int
|
Number of dimensions. |
required |
obj_coords
|
ndarray
|
Conditioning object coordinates in region along specified axes. |
required |
obj_data
|
ndarray
|
Values in selected region. |
required |
support_coords
|
ndarray
|
Support coordinates in region along specified axes. |
required |
power
|
int
|
Power used for distance computation. Defaults to 1. |
1
|
neighbors_number
|
Optional[int]
|
Number of neighbors taken for weighting. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
Tuple[ndarray, ndarray]
|
IDW results and distance ndarrays. |