QGIS/C4/Interpolation/English

From Script | Spoken-Tutorial
Revision as of 10:06, 23 January 2020 by Nancyvarkey (Talk | contribs)

Jump to: navigation, search
Visual Cue Narration
Slide Number 1

Title Slide

Welcome to this tutorial on Interpolation Methods in QGIS.
Slide Number 2

Learning Objectives

In this tutorial, we will learn about Interpolation methods.
  • Inverse Distance Weighting (IDW) and
  • Triangulated Irregular Network (TIN)
Slide Number 3

System Requirement

Here I am using
  • Ubuntu Linux OS version 16.04
  • QGIS version 2.18
Slide Number 4

Pre-requisites

To follow this tutorial you should be familiar with QGIS interface.

For the prerequisite tutorials in this series, please visit this website.

Slide Number 5

Example for Demonstration

Data files required for this tutorial are provided in the Code files link.

Please download and extract the contents of the folder.

Cursor on the code files folder.

Double click on the code file folder.

I have saved this folder on the Desktop.

Double-click on the folder to open it.

Cursor on Airstations.shp Locate AirStations.shp in the extracted folder.

This file shows meteorological stations located in Maharashtra.

Slide Number 6

About Interpolation

Interpolation is a method to create continuous surface from discrete points.

Two methods of interpolation are available in QGIS.

  • Inverse Distance Weighting (IDW)
  • Triangulated Irregular Network (TIN)
Interpolation is a method to create continuous surface from discrete points.

Two methods of interpolation are available in QGIS.

  • Inverse Distance Weighting (IDW)
  • Triangulated Irregular Network (TIN)
Slide Number 7

About Interpolation

Interpolation Plugin is used to create interpolated raster from Point layer.
Open the QGIS interface.

Click on Plugins menu, Select Manage and install Plugins.

In the Plugins dialog-box search for Interpolation plugin.

Check the check-box for Interpolation plugin.

Open the QGIS interface.

Here I have opened the QGIS interface.

Enable the interpolation plugin using Plugins menu as shown here.

Check the check-box for Interpolation plugin.

Close the dialog-box.

Click on Raster menu.

Cursor on the interpolation option.

Open the Raster menu.

Interpolation option is now added in the Raster menu.

Click on Add Vector Layer tool from the left panel.

Point to the dialog-box.

Click on Add Vector Layer tool.

Add vector layer dialog-box opens.

Click on the Browse button>>Desktop>>Interpolation-code-files. Click on Browse button and navigate to Code files folder.

Here we will select two files.

Click on AirStations.shp file. Select AirStations.shp file.
Hold the Ctrl key on the keyboard and click on MH_Districts .shp. Hold the Ctrl key on the keyboard and click on MH_Districts.shp.
Click on Open button in the Open an OGR Supported Vector Layer dialog-box.

Click on Open button on the Add vector layer dialog-box.

Click on the Open button.

Click on Open button on the Add vector layer dialog-box.

Cursor on the canvas.

Using cursor show the point features.

On the canvas we see map of Maharashtra state.

Locations of Air stations in each district are shown as point features.

Add labels for Air Stations.

Right click on the Air Stations layer>> Properties.

Layer Properties dialog-box opens.

Let us label these point features.

Right click on the Air Stations layer.

Click on Properties option to open Layer Properties dialog box.

Select the labels option located at the left side. Select the Labels option located on the left panel.
Click on the drop-down located at the top.

Select the Single Labels for this layer option from dropdown.

Click on the drop-down located at the top.

Select Show labels for this layer from the drop-down.

From new menu click on the Label With Option.

Select Air_Pollut from the drop-down.

In the Label with drop-down select Air_Pollut.

Scroll down.

Point to the options.

Click on OK button.

Here you will find various options to modify the label style.

Choose the required style and click on OK button.

Cursor on the canvas. On the canvas, points with the labels will be displayed.
Point towards the Air Stations layer on Layers panel. Open the attribute table for Air Stations.shp layer.
Cursor on the first column of the Attribute table.

Cursor on the Nox Column.

In the attribute table there are five columns.

In the 4th column, Nitrogen Oxides levels for every station is given.

Cursor on the interface.

Click on Close button.

We will interpolate Air Stations layer by the Nox attribute.

Here we will use IDW method for interpolation.

Close the attribute table.

Slide number 8

IDW Interpolation

Inverse Distance Weighting method gives weights to sample points.

It is used for interpolating data such as temperature, rainfall, population etc.

Open QGIS interface. Back to the QGIS interface.
Click on the Raster menu.

Locate the Interpolation Plugin.

Click on the Raster menu.
Click on the Interpolation plugin.

Cursor on the dialog-box.

Click on the interpolation plugin.

Interpolation plugin dialog-box opens.

Cursor on the Input.

Select Air Stations from Vector layers.

Cursor on the Air Stations.

In the Input section,

Select Air Stations as option as the Vector layers.

Here, by default, Air Stations layer is already selected.

Select Interpolation attribute as NOx. Select Interpolation attribute as NOx.
Click on the Add Button.

Air Stations.shp layer with NOx attribute is seen in the panel.

Click on Types drop-down and select Points.

Click on the Add Button.

This will add Air Stations.shp layer with NOx attribute.

Select Points in the Type drop-down.

Here Points is selected by default.

Select Inverse Distance Weighting (IDW) from Interpolation Method

drop-down.

Go to the Output section.

Select Interpolation method as Inverse Distance Weighting.

Leave all the settings as default.

Click on the three dots button next to Output File.

Give the name as IDW _Stations.

Save it on the Desktop and click on Save button.

Click on the three dots button next to Output file.

Save the output as an IDW_Stations in the desired folder.

I will save it on Desktop.

Check the check-box Add result to project. Check, Add result to project if it is unchecked.
Click on OK button. Click OK button.
Cursor on the map.

Point to White areas.

The map with black and white areas will be displayed on the screen.

White areas represent high levels of Nitrogen Oxides.

Point to black areas. Black areas represent low levels of Nitrogen Oxides.
Point Towards Interpolation_Stations layer.

Right click on IDW_Stations layer>>Select Properties.

For more clarity, we will change the symbology of the layer.

Open Layer properties for the IDW layer.

From the left panel, click on the Style option.

Select Render type as Single band Pseudocolor.

From the left panel, click on the Style option.

Select Render type as Single band Pseudocolor.

Click on Interpolation drop down and select Discrete.

Select Spectral from Color drop-down.

Check the check-box as Invert.

Select Discrete from Interpolation drop-down.

Choose Spectral from color drop-down.

Check the Invert check-box.

Cursor on Classify button.

Click on Apply and OK.

Click on the Classify button.

Leave all other settings as default.

Click on Apply and OK button.

Cursor on the QGIS interface.

Point to red area.

Cursor on blue area.

Map with areas in Spectral colors is displayed on the canvas.

The red colored areas have high concentration of Nitrogen Oxides.

Blue areas have least concentration of Nitrogen Oxides.

Save Your Results.

Give the name as IDW-Station.

Save it on the Desktop.

Click on Save button.

Save the project using Save tool from the tool bar.

Give an appropriate name.

Choose a convenient location.

Click on Save button.

Slide number 9

TIN Interpolation Method

Let us now learn about the Triangulated Irregular Network interpolation method.

TIN is used to create a surface formed by triangles.

This is based on nearest neighbor point information.

TIN method is commonly used for elevation data.

Click on New tool on the tool bar. Open a new QGIS window.

Click on New tool on the tool bar.

Add Vector Layer>> Browser>> Navigate to Points.shp layer.

Right click on Points.shp layer. Select Open Attribute Table.

Use the Add Vector Layer tool to load Points.shp layer.

Open Attribute table of Points layer.

Point to Elevation data. Notice the Elevation data for each point feature.
Close the Attribute table. Close the Attribute table.
Click on the Raster tab from the sub-menu select Interpolation. Again open Interpolation window from Raster menu.
In the Interpolation dialog-box select Points as Vector layers.

Select Elevation as Interpolation attribute.

In the Input section, select Points layer in the Vector layers drop-down.

Select elevation as Interpolation attribute.

Click on Add button.

Cursor on the Points layer.

Click on Add button.

This will add Points layer with elevation attribute for interpolating.

Points in Type drop-down is chosen automatically.

Leave it as such.

Select Triangular interpolation from the drop-down.

Click on the three dots button next to Output File.

Give the name as TIN-Stations.

Save it on the Desktop and click on Save button.

Click on OK button on the Interpolation plugin.

In the Output section, select Triangular interpolation as Interpolation method.

Save the output file as TIN-Stations and click OK.

Cursor on the QGIS interface. Map showing triangulated interpolation appears on the canvas.
Right click on TIN-Stations layer>>Select Properties.

From the left panel, click on the Style option.

Select render type as Single band Pseudocolor.

Click on Interpolation drop down and select Discrete.

Select Spectral from Color drop-down.

Check the check-box as Invert.

Cursor on classify tab.

Click on Apply and OK.

Change the symbology for this layer.

Follow the same steps as we did for IDW layer.

Cursor on the map.

Point to red area.

Point to blue area.

The map is now displayed in Spectral colors.

Areas in red represent high elevation.

Areas in blue represent low elevation.

Save your Result Save the maps using the Save tool on the toolbar.
Slide Number 10

Summary

Let us summarize,

In this tutorial we have learnt about two methods of Interpolation.

  • Inverse Distance Weighting (IDW)
  • Triangulated Irregular Network (TIN)
Slide Number 11

Assignment

For the assignment,

Create IDW interpolated map for Air Stations layer with SO2 attribute.

Show the glimpse of the map. Your map should look as shown here.
Slide Number 12

About the Spoken Tutorial Project

This video summarizes the Spoken Tutorial project.

Please download and watch it.

Slide Number 13

Spoken Tutorial Workshops

The spoken tutorial project team conducts workshops and gives certificates.

For more details please write to us.

Slide Number 14

Forum for specific question

Please post your timed queries in this forum.
Slide Number 15

Acknowledgements

The Spoken Tutorial project is funded by MHRD Government of India.

This tutorial is contributed by Ambadas Maske from College of Engineering Pune.

Snehalatha Kaliappan and Himanshi Karwanje from IIT Bombay.

Thank you for joining.

Contributors and Content Editors

Karwanjehimanshi95, Madhurig, Nancyvarkey, Snehalathak