User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.tgis_interpolationidw

TGIS_InterpolationIDW class

DK11 for ActiveX | TatukGIS_XDK11.TGIS_InterpolationIDW | Classes | Methods | Properties

Implementation of the Inverse Distance Weighting (IDW) interpolation method.

Available also on: Delphi | .NET | Java | Python.

Syntax

// C#
public class TGIS_InterpolationIDW : ITGIS_InterpolationIDW, ITGIS_VectorToGridAbstractEvents 
{
}
' VisualBasic
Public Class TGIS_InterpolationIDW
  Implements ITGIS_InterpolationIDW
  Implements ITGIS_VectorToGridAbstractEvents
End Class
// Oxygene
type
  TGIS_InterpolationIDW = public class
  end;

Implements

Methods

Inherited Overrides Protected
Name Visibility Description
AttachDelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
BusyEvent public
(Inherited from ITGIS_VectorToGridAbstractEvents)
DelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
Generate public Populates a pixel (grid) layer with values resulting from computations based on the set of sample points from the vector layer.
(Inherited from ITGIS_VectorToGridAbstract)

Properties

Inherited Protected
Name Visibility Description
Coordinate public Defines which coordinate is taken as interpolation value if the interpolation is not based on an attribute field; default is Z.
(Inherited from ITGIS_VectorToGridAbstract)
DefaultValue public If UseDefaultValue is true, then this value will be set for each grid cell for which the interpolated value cannot be computed.
(Inherited from ITGIS_VectorToGridAbstract)
Exponent public Exponent in the formula for weight calculation; default value is 2.
Radius public Applies only to the windowed method (Windowed = True).
UseDefaultValue public If true, then each grid cell for which the interpolated value cannot be computed will be set to DefaultValue.
(Inherited from ITGIS_VectorToGridAbstract)
Windowed public If True then the windowed version of the algorithm is used; true by default.

Remarks

Method

The Inverse Distance Squared (IDW) interpolation method assumes that the influence of the data points on the interpolated point diminishes with distance, i.e., nearby points have greater weight than points that are further away.

Usage

There are two different scenarios for generating an IDW interpolated grid:

  1. based on a Z, M, or Z+M coordinate value:
    • set the Coordinate property to the desired option
    • pass an empty string as the field name to the Generate method
  2. based on an attribute field value:
    • pass the field name to the Generate method
    • with above the Coordinate property is neglected

The Exponent property plays the role of a smoothening factor. For most cases, reasonable results are obtained for the exponent value between 2.0 (default) and 3.0. For big exponent values, the algorithm converges with the Voronoi diagram.

Use a windowed version of the algorithm (Windowed=True) for large datasets (thousands of points and more). For up to a few hundred points, the non-windowed (full sample) algorithm is efficient enough and gives the best possible results. The Radius property is the size of the window in map units.

Pros

  • good for interpolating data with extreme value changes at short distances
  • gives intuitive results for clusters of points with small value variation

Cons

  • interpolated values do not exceed the range of minimum to maximum values of the input data
  • not good for mountain-like areas, because it flattens peaks

References

2022/11/16 01:06

Page Tools