One of my first jobs involved a network of forty rain gauges scattered across a river basin. The hydrologist wanted a map of rainfall for the whole basin. “Just connect the dots,” he said. But rain doesn’t fall only at the gauges. It falls everywhere, and the question was: what happened in the places where nobody was measuring? That question, estimating values at locations where you have no data, from the locations where you do, is the problem of spatial interpolation.
Interpolation is both one of the most useful and one of the most abused techniques in GIS. Used well, it turns scattered measurements into a continuous surface that reveals patterns. Used carelessly, it produces beautiful, confident-looking maps that are largely fiction. In this guide I will explain the main methods, IDW, Spline and Kriging, in plain language, show when each one fits, and teach you how to judge whether your surface can be trusted.

What Is Spatial Interpolation?
Spatial interpolation estimates the value of a variable at unsampled locations using the values measured at sampled locations. The input is usually a set of points, such as weather stations, soil samples, wells, noise monitors or elevation spot heights. The output is typically a raster, a continuous surface in which every cell holds an estimated value. For the difference between vector points and raster surfaces, see Vector vs. Raster Data: The Complete Guide.
Interpolation vs. extrapolation
- Interpolation estimates values inside the area covered by your samples.
- Extrapolation estimates values outside it. This is far riskier, and most methods do it poorly. A good map clearly shows where it is extrapolating, or masks those areas.
Why does interpolation work at all?
Because of Tobler’s First Law of Geography: near things are more related than distant things. If rainfall at one gauge is 40 mm, a spot two kilometers away is probably close to 40 mm, and a spot two hundred kilometers away is not. Every interpolation method is a different way of turning this idea into a calculation. The same principle underlies the techniques in Spatial Statistics for GIS: Complete Guide.
When interpolation is not appropriate
- The phenomenon is not continuous across space: property values by parcel, or the number of accidents on roads. Interpolating them creates nonsense.
- There are barriers that break continuity, such as a mountain ridge or a coastline, that the method ignores.
- You have very few samples, or they are clustered in a few places.
- The variable is categorical, such as land cover classes. Specific methods exist, but the common ones below are for numeric data.
Two Families of Methods
Interpolation methods fall broadly into two groups.
- Deterministic methods: use mathematical formulas based on distance or smoothness. They are simple and fast, but give no estimate of uncertainty. IDW and Spline belong here.
- Geostatistical methods: use a statistical model of how values are spatially correlated, and produce both a prediction and a measure of uncertainty. Kriging belongs here.
Let’s meet them.
IDW: Inverse Distance Weighting
The idea
The estimate at a location is a weighted average of the nearby sample values, where the weights decrease with distance. Closer points count more, and farther points count less. Concretely, each weight is proportional to one divided by the distance raised to a power.
The key parameters
- Power: controls how fast influence fades. The common default is 2. A higher power gives more weight to the nearest points and a more local, spotty surface. A lower power gives a smoother, more averaged result.
- Search neighborhood: how many neighbors, or what radius, are used for each estimate. Using all the points is slow and may smooth too much. Using too few creates artifacts.
- Cell size: the resolution of the output raster.
Strengths
- Simple, fast and intuitive.
- Honors the data: at a sample location, the surface equals the measured value.
- Never produces values outside the range of the samples, which is reassuring for variables with natural limits.
- Works with irregularly distributed points.
Weaknesses
- The “bull’s-eye” effect. Peaks and pits form around the sample points, giving a pimpled look.
- No extrapolation of trends. The highest and lowest values on the surface are always at sample points, so a ridge or valley between points is flattened.
- Sensitive to clustering. Dense groups of points dominate.
- No uncertainty estimate.
- Arbitrary parameter choices that strongly influence the result.
Best for
Quick exploration, dense and fairly even sampling, and variables where a simple local average makes sense.
Spline
The idea
A spline fits a smooth, flexible surface through the sample points, as if you bent a thin rubber sheet to pass through all of them while minimizing the total bending. The result is a smooth surface with continuous slopes.
Variants and parameters
- Regularized spline: produces a smooth surface, which may overshoot beyond the data range.
- Tension spline: a stiffer sheet, giving results that stay closer to the data and fewer extreme overshoots.
- Thin plate spline: a well-known mathematical form of the rubber sheet.
- Weight and number of points: control smoothness and local fit.
Strengths
- Very smooth surfaces, visually pleasing and good for gently varying phenomena.
- Can estimate peaks and valleys that are not at sample points, unlike IDW.
- Works well with dense, evenly spaced samples of smoothly varying data.
Weaknesses
- Can overshoot, creating values above the maximum or below the minimum of the samples, which may be physically impossible, such as negative rainfall.
- Poor with abrupt changes or noisy data, where it creates wiggles.
- No uncertainty estimate.
- Sensitive to closely spaced samples with very different values.
Best for
Smooth, continuous variables, such as elevation, water table depth or temperature, with decent sampling.
Kriging
The idea
Kriging is the geostatistical method. Instead of assuming a fixed formula for how influence fades with distance, it measures it from your data. It examines how the difference between pairs of samples changes as the distance between them grows, and builds a model of that relationship, then uses the model to compute optimal weights. It’s like IDW, but with weights learned from the data’s own spatial structure, and with an honest estimate of the error.
The variogram: the heart of kriging
The semivariogram (or simply variogram) plots half the average squared difference between pairs of samples against the distance separating them. As distance grows, the difference usually grows, until it levels off. Three features describe it:
- Nugget: the value at zero distance. It represents measurement error and variation at scales smaller than your sampling.
- Sill: the level at which the curve flattens out, representing the overall variability.
- Range: the distance at which the curve reaches the sill. Beyond it, samples are no longer spatially correlated.
You fit a mathematical model to this curve (spherical, exponential, Gaussian and others). The model drives the kriging weights.
Types of kriging
- Ordinary kriging: assumes an unknown constant mean in the neighborhood. The most widely used and a good default.
- Simple kriging: assumes a known constant mean.
- Universal kriging: allows a trend in the data, such as rainfall increasing with elevation.
- Co-kriging: uses a second, correlated variable (such as elevation) to improve the estimate.
- Indicator and disjunctive kriging: for probabilities and thresholds, such as the chance that contamination exceeds a limit.
- Regression kriging: combines a regression on auxiliary variables with kriging of the residuals.
The workflow
- Explore your data: histogram, outliers, normality, spatial distribution and trends.
- Transform if needed, for skewed data (for example, logarithms).
- Compute and fit the variogram, checking nugget, sill and range.
- Choose the kriging type, and the search neighborhood.
- Produce two outputs: the prediction surface and the prediction variance (or standard error) surface.
- Validate with cross-validation, as described below.
Strengths
- Gives uncertainty. The error surface shows where predictions are reliable (near samples) and where they are not (far from them). This alone is a major reason to use it.
- Statistically optimal under its assumptions, with weights that account for clustering and for spatial structure.
- Flexible, with many variants for trends, secondary variables and thresholds.
- Handles clustered data better than IDW.
Weaknesses
- Requires more skill and judgment: modeling the variogram properly is not trivial.
- Needs enough data to estimate the variogram reliably, usually dozens of points at least.
- Assumptions matter: stationarity (similar spatial behavior everywhere) and a suitable model.
- Slower and more complex to run and explain.
Best for
Environmental and earth science data, when you have decent sample numbers, want a defensible result and need to know the uncertainty: soil properties, groundwater, contaminants, ore grades, rainfall.
Other Methods Worth Knowing
- Natural neighbor: uses the Voronoi (Thiessen) polygons of the samples to weight neighbors by the area they would “steal”. Gives smooth, local results with fewer artifacts, and never exceeds the sample range.
- TIN interpolation: builds a network of triangles from the points and interpolates linearly across each triangle. Simple, honors data, with a faceted look.
- Trend surface: fits a smooth polynomial surface through the whole dataset. Good for showing broad trends, poor as a precise predictor.
- Thiessen (Voronoi) polygons: assign each location the value of its nearest sample. Not smooth, but suited to categorical or highly discontinuous data.
- Kernel density: converts point events into a density surface. This isn’t interpolation of a measured value, but a way of showing concentration. See Spatial Statistics for GIS: Complete Guide.
Comparing the Methods
| Feature | IDW | Spline | Kriging |
|---|---|---|---|
| Type | Deterministic | Deterministic | Geostatistical |
| Honors sample values | Yes | Yes | Yes (with no nugget) |
| Stays within sample range | Yes | Not always | Not always |
| Produces uncertainty | No | No | Yes |
| Handles clusters | Poorly | Moderately | Well |
| Surface smoothness | Pimply, with bull’s-eyes | Very smooth | Smooth |
| Parameter difficulty | Low | Low to moderate | High |
| Data needed | Few to many | Moderate to dense | Moderate to many |
| Typical use | Quick, exploratory maps | Smooth physical surfaces | Scientific, defensible estimates |
How to Choose
Ask yourself:
- Is the variable truly continuous in space? If not, don’t interpolate.
- How many samples do I have, and how are they spread? Few or clustered: be cautious, and favor simple methods or kriging with careful modeling.
- Do I need to know the uncertainty? If yes, use kriging.
- Is the surface physically smooth? Spline, or kriging.
- Are there natural bounds (no negative values)? Prefer IDW, natural neighbor or tension spline, or transform the data.
- Is there a strong trend or a helpful secondary variable? Consider universal or regression kriging.
- What is the purpose? A quick visual overview can use IDW. A decision with consequences deserves a validated geostatistical approach.
A sound habit: try two or three methods, and compare them. If they agree, you can be more confident. If they differ greatly, your data may not support a reliable surface.
Validation: How Good Is My Surface?
A pretty map is not evidence. Always evaluate.
Cross-validation
Remove one sample at a time (leave-one-out), predict its value from the others, and compare with the true value. Repeat for all points. Summarize with:
- Mean error (ME): should be near zero, otherwise the method is biased.
- Root mean square error (RMSE): the typical size of the error, in the units of the variable. Smaller is better.
- For kriging, the standardized errors: should have a mean near zero and a standard deviation near one if the model describes the uncertainty well.
Independent validation
Hold back a random subset (for instance 20 percent) of your samples, interpolate with the rest, and test against the held-back points. This is more honest than cross-validation, if you have enough data.
Visual checks
- Does the surface look physically plausible?
- Are there bull’s-eyes, sharp artifacts or impossible values?
- Does it respect known features, such as a ridge or a coastline?
- For kriging, where is the error high? Don’t over-interpret those areas.
Practical Tips for Good Results
- Use a projected CRS with meaningful units, since distance is central to every method. See Coordinate Reference Systems (CRS) Explained Simply.
- Clean your data first: remove duplicates, check outliers and units, and decide whether extreme values are errors or real.
- Look at the sample design. Are measurements clustered along roads, or concentrated in easy-to-reach places? Spatial bias in sampling carries into the result.
- Choose a sensible cell size, not much smaller than the typical spacing between samples. A 10-meter grid built from points 5 kilometers apart is false precision.
- Mask the areas without data, or far from the nearest sample, and clearly mark extrapolated zones.
- Consider barriers such as ridges, rivers and coasts, and interpolate separately on each side if the phenomenon doesn’t cross them.
- Check for anisotropy, where spatial correlation differs by direction, for example along a prevailing wind or a geological structure. Some methods allow directional models.
- Be careful with elevation effects: for temperature or rainfall, an auxiliary variable like elevation can greatly improve results.
- Document the method and parameters, so that your surface can be reproduced and judged.
- Show the uncertainty when you can, and avoid presenting a smooth surface as measured truth.
Tools
- QGIS: IDW and TIN interpolation tools in the Processing Toolbox, plus many methods through GRASS and SAGA, including kriging.
- ArcGIS Pro: interpolation tools in Spatial Analyst (IDW, Spline, Natural Neighbor, Kriging, Trend), and the Geostatistical Analyst extension for advanced, interactive geostatistics.
- Python: SciPy for interpolation, and PyKrige for kriging.
- R: the gstat package is a long-standing standard for geostatistics.
- GeoDa and others for exploratory analysis of spatial data.
A minimal kriging example in Python:
import numpy as np
from pykrige.ok import OrdinaryKriging
# x, y: coordinates in a projected CRS (meters); z: measured values
OK = OrdinaryKriging(x, y, z, variogram_model="spherical",
verbose=False, enable_plotting=False)
gridx = np.arange(x.min(), x.max(), 500.0) # 500 m cells
gridy = np.arange(y.min(), y.max(), 500.0)
z_pred, z_var = OK.execute("grid", gridx, gridy) # prediction and varianceThe second output, z_var, is the kriging variance: your map of uncertainty. For wider automation, see Geospatial Development & Automation: The Ultimate Guide.
Common Mistakes
- Interpolating something that isn’t continuous. Counts by area or values attached to discrete objects.
- Using default parameters blindly. Defaults rarely suit your data.
- Ignoring sample size and distribution. Too few or too clustered.
- Producing a high-resolution surface from sparse data.
- Not validating, and trusting the most attractive map.
- Measuring in latitude and longitude, instead of a projected system.
- Letting extrapolation pass as fact, especially near the edges.
- Ignoring outliers or treating errors as signal.
- Not reporting the uncertainty or the method.
- Choosing a method because it looks better, rather than because it fits the data.
Final Thoughts
Interpolation is a bridge from isolated measurements to the continuous world we want to understand. But every bridge rests on assumptions, and the honest analyst knows them and states them. IDW is the quick sketch, Spline the smooth curve, and Kriging the careful, quantified estimate. None of them creates information that wasn’t in the samples. They only distribute it intelligently.
Next time you build a surface, do one thing differently: validate it, and mark where it is not to be trusted. That step separates a map that looks convincing from a map that actually is.
Where to go next: explore Digital Elevation Models (DEM) and Terrain Analysis, where interpolated surfaces become the foundation for slope, flow and visibility, and Spatial Autocorrelation and Moran’s I Explained to understand the statistical idea behind spatial dependence.



