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. Supports pointsets, downhole-intervals, regular 3D grids, masked 3D grids, tensor 3D grids, and block models.
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. An attribute containing the estimated values is created or updated on this object. Supports pointsets, downhole-intervals, regular 3D grids, masked 3D grids, tensor 3D grids, and block models.
attribute(geoscience object attribute target)- Target that points to the attribute where the IDW results will be created or updated.
operation(string, one ofcreate,update)- Create a new attribute, or update an existing one.
name(string, required forcreate)- Name of the new attribute.
reference(geoscience object attribute reference, required forupdate)- Reference to the existing attribute to update, instead of
name.
- Reference to the existing attribute to update, instead of
filter(object, optional)- Restricts the estimation to a subset of the target locations by filtering on an attribute of the target object. Values outside the filter are preserved or cleared according to
update_mode. See Filtering.
- Restricts the estimation to a subset of the target locations by filtering on an attribute of the target object. Values outside the filter are preserved or cleared according to
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.
ellipsoid(object)- Defines the three-dimensional search region.
ellipsoid_ranges(object)major,semi_major,minor(numbers, each greater than0)- Axis lengths of the search ellipsoid, in the source coordinate units.
rotation(object)dip_azimuth(number, optional,0to360, defaults to0)- First clockwise rotation, about the z-axis, in degrees.
dip(number, optional,0to180, defaults to0)- Second clockwise rotation, about the x-axis, in degrees.
pitch(number, optional,0to360, defaults to0)- Third clockwise rotation, about the z-axis, in degrees.
max_samples(integer, at least1)- Maximum number of nearby samples to use for each estimate.
min_samples(integer, optional, defaults to1)- Minimum number of samples required for an estimate. Must be between
1andmax_samples; locations with too few accepted samples are not estimated.
- Minimum number of samples required for an estimate. Must be between
max_empty_octants(integer, optional,0to8, defaults to8)- Maximum number of empty octants (the eight three-dimensional sectors around the evaluation point). Use
0to require a sample in every octant, or8to disable this check.
- Maximum number of empty octants (the eight three-dimensional sectors around the evaluation point). Use
max_samples_per_octant(integer, optional, at least1, defaults tonull)- Maximum number of samples from each octant. Omit or set to
nullfor no per-octant limit.
- Maximum number of samples from each octant. Omit or set to
max_empty_quadrants(integer, optional,0to4, defaults tonull)- Maximum number of empty quadrants (four horizontal sectors, ignoring z). Omit, set to
null, or use4to disable this check.
- Maximum number of empty quadrants (four horizontal sectors, ignoring z). Omit, set to
max_samples_per_quadrant(integer, optional, at least1, defaults tonull)- Maximum number of samples from each quadrant. Omit or set to
nullfor no per-quadrant limit.
- Maximum number of samples from each quadrant. Omit or set to
max_samples_per_drillhole(integer, optional, at least1, defaults tonull)- Maximum number of samples from each drillhole. Requires a downhole-intervals source. Omit or set to
nullfor no per-drillhole limit.
- Maximum number of samples from each drillhole. Requires a downhole-intervals source. Omit or set to
max_drillholes(integer, optional, at least1, defaults tonull)- Maximum number of distinct drillholes contributing to an estimate. Requires a downhole-intervals source. Omit or set to
nullfor no limit.
- Maximum number of distinct drillholes contributing to an estimate. Requires a downhole-intervals source. Omit or set to
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).
where(object)- The filter expression to apply.
type(string, one ofcondition,all_of,any_of)- Use
conditionfor a single attribute test,all_ofto require every child expression, orany_ofto require at least one.
- Use
attribute(geoscience object attribute reference, required forcondition)- Attribute on the source or target object to test.
operator(string, required forcondition)- Membership or numeric comparison operator from the list above.
values(array of strings or integers, required for membership tests)- Category names or integer category keys to match. Do not supply
thresholdwith a membership test.
- Category names or integer category keys to match. Do not supply
threshold(number, required for numeric comparisons)- Numeric value to compare against. Do not supply
valueswith a numeric comparison.
- Numeric value to compare against. Do not supply
filters(array of objects, required forall_oforany_of)- Child filter expressions, each with the same structure as
where. Composite expressions usefiltersinstead ofattribute,operator,values, orthreshold.
- Child filter expressions, each with the same structure as
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 neighborhood 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
This example assumes the source pointset has an integer-coded category attribute named domain, and the target grid has a corresponding cell attribute.
Drillhole Search Example
For a downhole-intervals source, add drillhole limits to the request's neighborhood:
Do not set these limits for a pointset or grid source.
Result
The initial request returns 303 with a job status URL. The result endpoint returns the following when the task completes.
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.