Inverse distance weighting (IDW)
Inverse Distance Weighting (IDW) estimates the value at each evaluation point from a weighted average of its nearest known samples. Each neighbor's weight is inversely proportional to its distance raised to a chosen power, so closer samples contribute more than distant ones. With a higher power, nearby samples dominate; with a lower power, the estimate is smoother.
Parameters
source(object)object(geoscience object reference)- Reference to a geoscience object containing the spatial locations of known values. Must be a pointset or downhole-intervals object.
attribute(geoscience object attribute reference)- Reference to a one-dimensional continuous attribute inside the source object that contains the known values used for estimation.
filter(object, optional)- Restricts the estimation to a subset of the source samples by filtering on an attribute of the source object. See Filtering.
target(object)object(geoscience object reference)- Reference to the geoscience object where the IDW results will be stored. A new attribute containing the estimated values is created on this object. Must be a pointset, downhole-intervals, regular-3d-grid, or regular-masked-3d-grid object.
attribute(geoscience object attribute target)- Target that points to the attribute where the IDW results will be created or updated.
filter(object, optional)- Restricts the estimation to a subset of the target locations by filtering on an attribute of the target object. Locations that are filtered out are left as
NaN. See Filtering.
- Restricts the estimation to a subset of the target locations by filtering on an attribute of the target object. Locations that are filtered out are left as
update_mode(string, optional, one ofauto,merge,replace; defaults toauto)- Controls what happens to target locations this run did not estimate. See Estimating one domain at a time.
neighborhood(object)- Search parameters that determine which nearby samples to use for each evaluation point.
power(number)- Positive number controlling how quickly a neighbor's influence decreases with distance. Weights are proportional to , where is the distance in the anisotropic search space and is the power. Common values are
1.0and2.0; larger values give nearby samples greater dominance.
- Positive number controlling how quickly a neighbor's influence decreases with distance. Weights are proportional to , where is the distance in the anisotropic search space and is the power. Common values are
Filtering
Both source.filter and target.filter accept a filter expression with a single where clause. The where clause is either a leaf condition or a composite (all_of / any_of) of nested expressions.
A leaf condition uses an operator together with either values (for membership operators in / not_in) or threshold (for the comparison operators equal, not_equal, greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to).
Estimating one domain at a time
A common workflow is to run the estimation once per domain, each run using target.filter to select that domain's locations, and write every run into the same attribute. target.update_mode controls what happens to the locations a run did not estimate.
auto(default) — merge whentarget.filteris set, replace otherwise. This is what you want for the workflow above: each run leaves the other domains' results untouched, and the final version holds every domain.merge— always leave locations this run did not estimate at their previous values.replace— always clear them, so the attribute only ever holds the results of the latest run.
After the first run, point target.attribute at the attribute the previous run wrote ("operation": "update"). Merging preserves what is already stored in that attribute, so a run that creates a new one has nothing to merge with.
Block model targets merge in BlockSync. Every other target type is written as a whole document, so the task reads the attribute's current values back and merges them itself, which costs one extra download per attribute.
"Did not estimate" covers both locations the filter excluded and locations inside the filter where the neighbourhood search found no samples.
Run the domains sequentially. Each run builds on the version the previous one produced, so concurrent runs can overwrite each other.
Example
For more information, see the inverse-distance-weighting API reference.
Request
Result
Tips
- The source and target can use the same object, but they don't have to.
- IDW with
power = 2.0(inverse-distance-squared) is a common default. Use a higher power when you want closer samples to dominate; use a lower power for a smoother estimate. - For an unweighted average of the nearest neighbors (equal votes), use the k-nearest-neighbors task instead.