Difference between revisions of "QGIS/C4/Interpolation/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {|border=1 || '''Visual Cue''' || '''Narration''' |- || '''Slide Number 1''' '''Title Slide''' || Welcome to this tutorial on '''Interpolation Methods''' in QGIS. |- || ''...")
 
Line 26: Line 26:
 
|| Here I am using
 
|| Here I am using
  
'''Ubuntu Linux''' OS version 16.04
+
*'''Ubuntu Linux''' OS version 16.04
  
'''QGIS''' version 2.18
+
*'''QGIS''' version 2.18
  
 
|-
 
|-
Line 34: Line 34:
  
 
'''Pre-requisites'''
 
'''Pre-requisites'''
|| To follow this tutorial you should be familiar with QGIS interface.
+
|| To follow this tutorial you should be familiar with '''QGIS''' interface.
  
 
For the prerequisite tutorials in this series, please visit this website.
 
For the prerequisite tutorials in this series, please visit this website.
Line 43: Line 43:
 
'''Example for Demonstration'''
 
'''Example for Demonstration'''
  
|| Data files required for this tutorial are provided in the Code files link.
+
|| Data files required for this tutorial are provided in the '''Code files''' link.
  
 
Please download and extract the contents of the folder.
 
Please download and extract the contents of the folder.
Line 51: Line 51:
  
 
Double click on the code file folder.
 
Double click on the code file folder.
|| I have saved this folder on the Desktop.
+
|| I have saved this folder on the '''Desktop'''.
  
 
Double-click on the folder to open it.
 
Double-click on the folder to open it.
Line 68: Line 68:
 
Interpolation is a method to create continuous surface from discrete points.
 
Interpolation is a method to create continuous surface from discrete points.
  
Two methods of interpolation are available in QGIS.
+
Two methods of interpolation are available in '''QGIS'''.
  
 
* '''Inverse Distance Weighting (IDW)'''
 
* '''Inverse Distance Weighting (IDW)'''
 
* '''Triangulated Irregular Network (TIN)'''
 
* '''Triangulated Irregular Network (TIN)'''
  
|| Interpolation is a method to create continuous surface from discrete points.
+
|| '''Interpolation''' is a method to create continuous surface from discrete points.
  
Two methods of interpolation are available in QGIS.
+
Two methods of '''interpolation''' are available in QGIS.
  
 
* '''Inverse Distance Weighting (IDW)'''
 
* '''Inverse Distance Weighting (IDW)'''
Line 94: Line 94:
  
 
Check the check-box for '''Interpolation plugin'''.
 
Check the check-box for '''Interpolation plugin'''.
|| Open the QGIS interface.
+
|| Open the '''QGIS''' interface.
 
   
 
   
Here I have opened the QGIS interface.
+
Here I have opened the '''QGIS''' interface.
  
 
Enable the interpolation plugin using '''Plugins''' menu as shown here.
 
Enable the interpolation plugin using '''Plugins''' menu as shown here.
Line 122: Line 122:
 
|-
 
|-
 
|| Click on the '''Browse''' button>>'''Desktop'''>>'''Interpolation-code-files'''.
 
|| Click on the '''Browse''' button>>'''Desktop'''>>'''Interpolation-code-files'''.
|| Click on '''Browse''' button and
+
|| Click on '''Browse''' button and navigate to '''Code files''' folder.  
 
+
Navigate to code files folder.  
+
  
 
Here we will select two files.
 
Here we will select two files.
Line 134: Line 132:
 
|-
 
|-
 
|| 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'''.
|| 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'''.
  
 
|-
 
|-
Line 158: Line 156:
  
 
'''Layer Properties''' dialog-box opens.
 
'''Layer Properties''' dialog-box opens.
|| Let us label these '''point features'''.
+
|| Let us label these point features.
  
 
Right click on the '''Air Stations layer'''.
 
Right click on the '''Air Stations layer'''.
Line 180: Line 178:
  
 
Select '''Air_Pollut''' from the drop-down.
 
Select '''Air_Pollut''' from the drop-down.
|| In the '''Label With''' drop-down select '''Air_Pollut'''.
+
|| In the '''Label with''' drop-down select '''Air_Pollut'''.
  
 
Scroll down.
 
Scroll down.
Line 197: Line 195:
 
|-
 
|-
 
|| Point towards the '''Air Stations''' layer on Layers panel.
 
|| Point towards the '''Air Stations''' layer on Layers panel.
|| Open the attribute table for '''Air Stations.shp''' layer.
+
|| Open the '''attribute''' table for '''Air Stations.shp''' layer.
  
 
|-
 
|-
Line 203: Line 201:
  
 
Cursor on the '''Nox''' Column.
 
Cursor on the '''Nox''' Column.
|| In the attribute table there are five columns.
+
|| In the '''attribute''' table there are five columns.
  
In the 4th column, Nitrogen Oxides levels for every station is given.
+
In the 4th column, '''Nitrogen Oxides''' levels for every station is given.
  
 
|-
 
|-
Line 211: Line 209:
  
 
Click on''' Close''' button.
 
Click on''' Close''' button.
|| We will interpolate '''Air Stations''' layer by the '''Nox''' attribute.
+
|| We will '''interpolate Air Stations layer''' by the '''Nox attribute'''.
  
Here we will use '''IDW method''' for interpolation.
+
Here we will use '''IDW method''' for '''interpolation'''.
  
Close the attribute table.
+
Close the '''attribute''' table.
  
 
|-
 
|-
Line 224: Line 222:
 
|| '''Inverse Distance Weighting''' method gives weights to sample points.
 
|| '''Inverse Distance Weighting''' method gives weights to sample points.
  
It is used for interpolating data such as temperature, rainfall, population etc.
+
It is used for '''interpolating''' data such as temperature, rainfall, population etc.
  
 
|-
 
|-
 
|| Open QGIS interface.
 
|| Open QGIS interface.
|| Back to the QGIS interface.
+
|| Back to the '''QGIS''' interface.
  
 
|-
 
|-
Line 254: Line 252:
 
Select '''Air Stations''' as option as the '''Vector layers'''.
 
Select '''Air Stations''' as option as the '''Vector layers'''.
  
Here, by default, '''Air Stations''' layer is already selected.
+
Here, by default, '''Air Stations layer''' is already selected.
  
 
|-
 
|-
|| Select '''Interpolation''' attribute as '''NOx'''.
+
|| Select '''Interpolation attribute''' as '''NOx'''.
|| Select '''Interpolation''' attribute as '''NOx'''.
+
|| Select '''Interpolation attribute''' as '''NOx'''.
  
 
|-
 
|-
Line 269: Line 267:
 
|| Click on the '''Add '''Button.
 
|| Click on the '''Add '''Button.
  
This will add '''Air Stations.shp''' layer with '''NOx''' attribute.
+
This will add '''Air Stations.shp layer''' with '''NOx''' attribute.
  
 
Select '''Points '''in the''' Type '''drop-down.
 
Select '''Points '''in the''' Type '''drop-down.
Line 283: Line 281:
 
Select '''Interpolation method''' as '''Inverse Distance Weighting'''.
 
Select '''Interpolation method''' as '''Inverse Distance Weighting'''.
  
Leave all the Settings as '''default'''.
+
Leave all the settings as '''default'''.
  
 
|-
 
|-
Line 291: Line 289:
  
 
Save it on the '''Desktop''' and click on '''Save''' button.
 
Save it on the '''Desktop''' and click on '''Save''' button.
|| Click on the three dots button''' '''next to '''Output file'''.
+
|| Click on the three dots button next to '''Output file'''.
  
Save the output as an '''IDW_Stations''' in the desire folder.
+
Save the output as an '''IDW_Stations''' in the desired folder.
  
 
I will save it on '''Desktop'''.
 
I will save it on '''Desktop'''.
Line 332: Line 330:
 
|| From the left panel, click on the '''Style '''option.
 
|| From the left panel, click on the '''Style '''option.
  
Select '''render type''' as '''Single band Pseudocolor'''.  
+
Select '''Render type''' as '''Single band Pseudocolor'''.  
  
 
|-
 
|-
Line 347: Line 345:
  
 
|-
 
|-
|| Cursor on '''classify''' tab.
+
|| Cursor on '''Classify''' button.
  
 
Click on '''Apply''' and '''OK'''.
 
Click on '''Apply''' and '''OK'''.
|| Click on the '''classify''' button.
+
|| Click on the '''Classify''' button.
  
Leave all other settings as '''default'''.
+
Leave all other settings as default.
  
 
Click on '''Apply''' and '''OK''' button.
 
Click on '''Apply''' and '''OK''' button.
Line 378: Line 376:
 
Click on '''Save '''button.
 
Click on '''Save '''button.
  
|| Save the project using '''Save''' tool from the tool bar.
+
|| Save the '''project''' using '''Save''' tool from the tool bar.
  
 
Give an appropriate name.
 
Give an appropriate name.
Line 407: Line 405:
 
|| '''Add Vector Layer>> Browser>> Navigate to Points.shp layer.'''
 
|| '''Add Vector Layer>> Browser>> Navigate to Points.shp layer.'''
  
Right Click on '''Points.shp''' layer. Select '''Open Attribute Table'''.
+
Right click on '''Points.shp''' layer. Select '''Open Attribute Table'''.
|| Use the '''Add Vector Layer''' tool to load '''Points.shp''' layer.
+
|| Use the '''Add Vector Layer''' tool to load '''Points.shp layer.'''
  
 
Open '''Attribute table''' of '''Points''' layer.
 
Open '''Attribute table''' of '''Points''' layer.
Line 414: Line 412:
 
|-
 
|-
 
|| Point to '''Elevation '''data.
 
|| Point to '''Elevation '''data.
|| Notice the '''Elevation''' data for each '''Point feature.'''
+
|| Notice the '''Elevation''' data for each point feature.
  
 
|-
 
|-
|| Close the '''Attribute''' table'''.
+
|| Close the '''Attribute''' table.
|| Close the '''Attribute''' table'''.
+
|| Close the '''Attribute''' table.
  
 
|-
 
|-
Line 436: Line 434:
  
 
Cursor on the '''Points layer'''.
 
Cursor on the '''Points layer'''.
|| Click on '''Add '''Button.
+
|| Click on '''Add '''button.
  
This will add '''Points layer''' with '''Elevation attribute''' for '''interpolating'''.
+
This will add '''Points layer''' with '''elevation attribute''' for '''interpolating'''.
  
 
'''Points''' in '''Type''' drop-down is chosen automatically.
 
'''Points''' in '''Type''' drop-down is chosen automatically.
Line 478: Line 476:
  
 
Click on''' Apply '''and''' OK.'''
 
Click on''' Apply '''and''' OK.'''
|| Change the '''symbology''' for this layer.
+
|| Change the '''symbology''' for this '''layer'''.
  
Follow the same steps as we did for '''IDW''' layer.
+
Follow the same steps as we did for '''IDW layer'''.
  
 
|-
 
|-
Line 504: Line 502:
 
|| Let us summarize,
 
|| Let us summarize,
  
In this tutorial we have learnt about two methods of Interpolation.
+
In this tutorial we have learnt about two methods of '''Interpolation'''.
  
 
* '''Inverse Distance Weighting (IDW)'''
 
* '''Inverse Distance Weighting (IDW)'''
Line 516: Line 514:
 
|| For the assignment,
 
|| For the assignment,
  
Create IDW Interpolated map for Air Stations layer with SO<sub>2 </sub>attribute.
+
Create '''IDW interpolated''' map for '''Air Stations layer''' with '''SO<sub>2 </sub>attribute'''.
  
 
|-
 
|-
Line 551: Line 549:
  
 
'''Acknowledgements'''
 
'''Acknowledgements'''
|| The Spoken Tutorial Project is funded by '''MHRD''' '''Government of India'''.
+
|| The Spoken Tutorial project is funded by '''MHRD''' '''Government of India'''.
  
 
This tutorial is contributed by Ambadas Maske from College of Engineering Pune.
 
This tutorial is contributed by Ambadas Maske from College of Engineering Pune.

Revision as of 10:01, 23 January 2020

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 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