Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

FALCAO Marcos

MICHELETTI Álvaro

Tutorial Interpolation in QGIS

Interpolation: Interpolation is the mathematical procedure applied to derive value between


two points having a prescribed value. The process of approximating the value of a given
function at a given set of discrete points.

How to do it:

- Use the function Interpolation (TIN/IDW) in


the tools in the menu in the side
- IDW uses the weighted distance of
the nearby points and their values to
approximate the value of each point,
while TIN uses the area of the
triangles determined by three nearby
points to weight their contributions
to determine each point.
-
- In IDW, the distance is weighed by a
factor P. The bigger P is, points that
are further and further from the studied point will have an impact on its
calculated value

- Click on Interpolation
- Choose the variable that is to be interpolated
- Choose P (not applicable for TIN)
- Set “extension” to be equal to the layer that contains the variable being interpolated
- Determine the size of the pixels present in the data
- Run

To calculate the RMSE (quality indicator of the predictions of the interpolation) you take the
square root of sum of the squares of the differences of the observations and the interpolations,
divided by N. That is:
You can do this in QGIS by creating a new variable in the layer with the observations used
for testing (obs.: the interpolation is created using a dataset, and then other observations not
used for fitting the interpolation are used to check the error between them and the
interpolated values. These are called the training values and the test values).

You do this in the field calculator, by creating a new variable defined by the squared
difference of the test observations and the interpolated values (the variables are in the “Fields
and Values” field in the menu on the bottom right, and you input the formula in the prompt in
the bottom left).

Afterwards, you can use the menu on the right of QGIS to ask for the statistics of the layer,
get the average of the variable you just created and get its square root to obtain the RMSE.
The smaller it is, the better fitting the interpolation is.

Interpolate by Kriging

Kriging → It’s a method that uses a limited set of sampled data points to estimate the value of
a variable over a continuous spatial field.

To interpolate by kriging you can use the Plugin Smart-Map.


- First, install the Smart-Map plugin on QGIS

- Save your project in a working directory, where you’ll find the outputs of Smart-Map
- Open your data on Smart-Map and specify the input layer and the attribute that you
want to interpolate, click on “Import”

- Go to grid to change the size of pixels


- And then in Interpolation you can calculate the semi-variogram (the parameters are
adjusted automatically)
- The semi-variogram plots the variance between observations in function of the
distance between them. In practice, it shows until what distance there is
correlation between the observations. If there was no spatial structure to the
data, variance would be constant. When there is spatial correlation, variance
grows until it reaches a plateau.
- Click on “Interpolate” to make the interpolation with Kriging
- You can import the generated raster on QGIS, it will be saved in the working
directory.

You might also like