DK11 for Delphi | GisInterpolation.TGIS_InterpolationKriging | Classes | Constructors | Methods | Properties
Implementation of the ordinary Kriging interpolation method.
// Delphi type TGIS_InterpolationKriging = class( TGIS_VectorToGridAbstract ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_InterpolationKriging : public TGIS_VectorToGridAbstract { };
Name | Visibility | Description | |
---|---|---|---|
Generate | public | Populates a pixel (grid) layer with values resulting from computations based on the set of sample points from the vector layer. (Overrides TGIS_VectorToGridAbstract.Generate) |
|
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 TGIS_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 TGIS_VectorToGridAbstract) |
|
MaxPoints | public | The maximum number of input data points used to interpolate at each grid cell; default is 4. | |
MinPoints | public | The minimum number of input data points used to interpolate at each grid cell; default is 4. | |
Radius | public | Defines the distance of search for input data points for a grid cell. | |
Semivariance | public | Model used for the semivariance calculation; default is power-law. | |
UseDefaultValue | public | If true, then each grid cell for which the interpolated value cannot be computed will be set to DefaultValue. (Inherited from TGIS_VectorToGridAbstract) |
|
Windowed | public | If True then the windowed version of the algorithm is used; false by default. | |
The Kriging interpolation method is a geostatistical technique that considers the distance and the degree of variation of the input data.
There are two different scenarios for generating a Kriging interpolated grid:
Coordinate
property to the desired optionGenerate
methodGenerate
methodCoordinate
property is neglected
The Semivariance
property defines semivariance model implementation. The default semivariance model is Power Law. The complete list of implemented semivariance models:
TGIS_SemivariancePowerLaw
TGIS_SemivarianceExponential
TGIS_SemivarianceGaussian
TGIS_SemivarianceSpherical
TGIS_SemivarianceCircular
TGIS_SemivarianceLinear
To implement an additional semivariance model, inherit from TGIS_SemivarianceAbstract
, TGIS_SemivarianceWithRange
or TGIS_SemivarianceWithSill
(depending on the type of semivariance).
Use a windowed version of the algorithm (Windowed=True
) for large datasets (thousands of points and more). For up to few hundred points, the non-windowed (full sample) algorithm is efficient enough and gives best possible results. The Radius
property is the size of the window in map units. The MinPoints/MaxPoints properties define the minimum/maximum number of sample points necessary/taken to interpolate a grid value.
var src : TGIS_LayerVector ; dst : TGIS_LayerPixel ; vtg : TGIS_InterpolationKriging ; ext : TGIS_Extent ; begin // get the source layer (GIS is TGIS_ViewerWnd) src := TGIS_LayerVector( GIS.Get( 'points' ) ) ; ext := src.Extent ; // create the destination layer (grid, 200x200 pixels) dst := TGIS_LayerPixel.Create ; dst.Build( True, lsrc.CS, ext, 200, 200 ) ; dst.Name := 'Heatmap' ; dst.Params.Pixel.GridShadow := False ; // create an instance of the kriging interpolation engine vtg := TGIS_InterpolationKriging.Create ; try // attach event to track the progress vtg.BusyEvent := doBusyEvent ; // set the semivariance model svr := TGIS_SemivarianceSpherical.Create ; svr.Range := 15.0 ; svr.Sill := 0.0 ; vtg.Semivariance := svr ; // initiate the grid generation process for the // POPULATION attribute field vtg.Import( lsrc, ext, 'POPULATION', ldst, ext ) ; finally vtg.Free ; end ; // add the grid to the viewer GIS.Add( dst ) ; // update the viewer GIS.FullExtent ; end ;