Aller au contenu principal

GDAL Linear Interpolation

Overview

Linear Interpolation is an interpolation method that builds a spatial surface based on a triangulated irregular network (TIN). The tool first builds a Delaunay triangulation from the input point features, then determines which triangle contains the interpolation location and estimates the target value by linearly weighting the attribute values of the triangle's three vertices.

Unlike IDW or moving average methods, linear interpolation generates a coherent faceted surface made of many small inclined planes. It is exact at sample points and remains continuous along triangle boundaries, but the gradient (slope) may not be smooth at those boundaries.

How It Works

  1. Build the triangulation: Perform Delaunay triangulation on the input point set.
  2. Locate the position: Determine the triangle containing the interpolation location x0x_0.
  3. Apply linear weighting: Use barycentric coordinates for interpolation: Z^(x0)=λ1Z(x1)+λ2Z(x2)+λ3Z(x3)\hat{Z}(x_0) = \lambda_1 Z(x_1) + \lambda_2 Z(x_2) + \lambda_3 Z(x_3) where λ1+λ2+λ3=1\lambda_1 + \lambda_2 + \lambda_3 = 1, and λi\lambda_i represents the weight of x0x_0 relative to the three vertices.

Use Cases

  • Terrain reconstruction: Generate a DEM surface with clear geometric structure from discrete elevation points or contour sample points.
  • Smooth variable modeling: Suitable for variables with regular spatial variation and locally near-linear behavior, such as groundwater levels or top and bottom elevations of strata.
  • Engineering surveying: Quickly generate a preliminary construction surface model on engineering sites where sample points are laid out regularly.

Parameters

ParameterDescriptionNotes
Input vector fileThe vector dataset containing the spatial point features to interpolate.Must include spatial coordinates.
Interpolation fieldThe numeric attribute column used for interpolation.Must be an integer or floating-point field.
Search radiusThe distance limit for searching nearest neighbor points (radius). The default value is -1.If set to >0 and a point is outside this distance, the output is empty.
Output settingsDefines the spatial reference, extent, and cell size of the result raster.See common raster output settings.
Output fileSpecifies the storage location and file name of the output raster data.See common raster output settings.

Steps

  1. Start the tool: Open Raster Basic Tools > Interpolate to Raster, then double-click Linear Interpolation.
  2. Set the input: Select the vector point layer and specify the interpolation field.
  3. Configure parameters:
    • In most cases, keep Search radius at the default value of -1 to interpolate across the full triangulation extent.
  4. Configure output properties: In Output settings, define the target coordinate system, analysis extent, and resolution.
  5. Run the tool: Click Run.

Notes

  • Convex hull limitation: Linear interpolation is valid only within the convex hull of the point set, which is the polygon formed by the outermost points. Areas outside the convex hull cannot form triangles and are automatically filled as NoData.
  • Discontinuous gradient: Although the interpolation surface is continuous, the surface slope (first derivative) changes abruptly along shared triangle edges, and the generated result may show obvious angular facets.
  • Point density dependency: Interpolation quality depends heavily on triangulation quality. If extremely long and narrow triangles exist, the local reliability of the interpolation result decreases.