2.2.
Interpolating point data
Next, we will be interpolating our data. There are many different algorithms for
doing this, from simple algorithms that take the value of the closest point
(Nearest Neighbour), to complex spline or
Kriging <https://en.wikipedia.org/wiki/Kriging> interpolation techniques. We will be
exploring the nearest neighbour, Inverse Distance Weighting and several splines
in this chapter. Finally, we will obtain our rainfall value from the
Thin
Plate Spline algorithm. It is recommended to first read
/docs/gentle_gis_introduction/spatial_analysis_interpolation.
2.2.1. Nearest Neighbour
Run the algorithm. The output map should look like this:
Fig. 2.1 Nearest neighbour interpolated precipitation
ChallengeIt seems to be possible to Set cellsize and extent in a similar way, so that your grid is automatically clipped to Hadocha_dem.
2.2.2. Inverse Distance Weighting
Inverse distance weighting is an interpolation method in which the influence of a datapoint on the value of the interpolated raster decreases with distance.
For Extent, select .
As Pixel size X and Pixel size Y enter
1970. The Rows and Columns fields should adjust.Run the algorithm. Your map should look like this:
Fig. 2.2 IDW interpolated precipitation.
try to get similar results with algorithms from
GDAL and
GRASS
2.2.3. Spline interpolation
A spline is a piecewise defined polynomial. There are many different ways to generate a spline from a set of datapoints. We will be using a thin plate spline which creates a minimum curvature surface through all datapoints.
find and open the
Thin plate spline tool
You may encounter the following warning that you can safely ignore:Warning
SAGA version <version> is not officially supported - algorithms may encounter issues
Set Number of Points to

[1] All points within search distancefor Cellsize enter
1970Run the algorithm. Your output should look like this:
Fig. 2.3 Thin plate spline interpolation
notice that the raster value extremes exceed the values of the datapoints. This is a characteristic of (thin plate) spline interpolation.
2.2.4.
Final interpolation
Now we have looked at different algorithms and compared their characteristics, it is time to select one and obtain a precipitation raster. Normally, to choose an interpolation method, you would randomly sample points, perform an interpolation on them and compare the error between interpolated and data values. Due to the amount of datapoints, this is not possible, and we choose thin plate spline by means of expert opinion.
For Input layer select and select
Hadocha_mask:
Note
Note that the filepath becomes:
path/00_raw_input.gpkg|layername=Hadocha_maskThe last part after|tells the algorithm which layer to select from the GeoPackage. This may be useful if you want to manually enter a path to a GeoPackage layer!We only want the
Mean to be calculated. Run the
algorithm. This creates a vector layer with the average precipitation value for
our catchment.Open the attribute table and copy the precipitation value to your clipboard
If not loaded yet, load the DEM into the map
To save the raster layer in our
01_input.gpkgdatabase, right-click with:
Solution
The rainfall value is 1744

