GDAL Inverse Distance Weighted Interpolation
Overview
Inverse Distance to a Power, abbreviated as Invdist, is a deterministic interpolation method based on the assumption of spatial autocorrelation. It uses the distance between the interpolation location and sample points as weights for weighted averaging, following the "first law of geography": the closer a sample point is to the interpolation location, the greater its weight.
This tool uses a numeric attribute field from vector points to perform weighted calculations from surrounding sample points, generating a continuous numeric surface cell by cell on a regular raster grid.
How It Works
At any interpolation location , the estimated value is calculated as the weighted average of surrounding known sample points:
The weight is defined as a power function of distance:
- : Planar distance between the interpolation location and a sample point.
- : Distance decay exponent (Power), which controls how quickly weight decreases as distance increases.
- : Smoothing parameter, used to reduce abrupt weight changes caused by very small distances.
Use Cases
- Meteorological monitoring: Generate continuous meteorological distribution maps from discrete weather station data, such as temperature or precipitation.
- Environmental pollution assessment: Model a continuous concentration surface showing pollutants spreading from pollution sources.
- Terrain-assisted modeling: Quickly generate an elevation trend surface in areas with dense sample points.
Parameters
| Parameter | Description | Notes |
|---|---|---|
| Input vector file | The vector dataset containing the spatial point features to interpolate. | Supports formats such as SHP and GeoJSON. |
| Interpolation field | The numeric attribute column used for interpolation. | Must be an integer or floating-point field. |
| Power | Controls the distance decay rate. The default value is 2. | Larger values give nearby points higher weights and make the interpolation surface more "peaked". |
| Smoothing | Suppresses abrupt changes around sample points, also known as the bullseye effect. The default value is 0. | Larger values produce a smoother surface. |
| X search radius | The semi-axis length of the elliptical search neighborhood along the X axis (radius1). | Only sample points within this range participate in the calculation. |
| Y search radius | The semi-axis length of the elliptical search neighborhood along the Y axis (radius2). | Defines the search ellipse together with radius1. |
| Angle | The counterclockwise rotation angle of the elliptical search neighborhood relative to the X axis. | Used to capture directional trends in the data. |
| Maximum points | Limits the maximum number of neighborhood sample points used in the calculation. | If exceeded, the nearest points are selected first. The default value is 0, meaning no limit. |
| Minimum points | The minimum number of sample points required for calculation. | If there are not enough points within the range, the cell is output as NoData. |
| Output settings | Defines the spatial reference, extent, and cell size of the result raster. | See common raster output settings. |
| Output file | Specifies the storage location and file name of the output raster data. | See common raster output settings. |
Steps
- Start the tool: Open Raster Tools > Interpolate to Raster, then double-click Inverse Distance Weighted Interpolation.
- Set the input: Select the vector point file and specify the interpolation field.
- Configure parameters:
- Set Power based on the data distribution. A common value is 2.
- Increase Smoothing as needed to create smoother transitions.
- Define the search radius to limit the local calculation range.
- Configure output properties: In Output settings, define the target coordinate system, analysis extent, and cell size (resolution).
- Run the tool: Click Run. The generated continuous surface is automatically loaded to the map.
Notes
- Bullseye effect: When Smoothing is 0 and sample points contain extreme values, the interpolation surface may show obvious ring-shaped peaks around sample points. Increasing Smoothing can reduce this effect.
- Sample distribution: IDW is sensitive to the uniformity of sample points. If sample points are too sparse in some areas, the reliability of the interpolation result decreases.
- Data extrapolation: IDW does not support extrapolation. The interpolated maximum and minimum values do not exceed the value range of the original sample points.