Difference between revisions of "QGIS/C4/Create-Contour-Lines/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 '''Create Contour Lines''' in '''QGIS'''. |- ||...")
 
Line 14: Line 14:
  
 
|| In this tutorial, we will learn to,
 
|| In this tutorial, we will learn to,
* Clip the area in '''DEM''' using '''Clipper''' tool.
+
* Clip the area in '''DEM''' using the '''Clipper''' tool.
  
 
* Show '''contour''' lines for the '''DEM'''.
 
* Show '''contour''' lines for the '''DEM'''.
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
  
And a working Internet connection.
+
*And a working Internet connection.
  
 
|-
 
|-
Line 52: Line 52:
  
 
Double-click on the folder.
 
Double-click on the 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 58: Line 58:
 
|-
 
|-
 
|| Right-click on '''srtm_51_09.tif '''file and open with '''QGIS''' Desktop.
 
|| Right-click on '''srtm_51_09.tif '''file and open with '''QGIS''' Desktop.
|| Right-click on '''srtm.tif''' file and open with '''QGIS''' Desktop.
+
|| Right-click on '''srtm.tif''' file and select '''Open with QGIS Desktop'''.
  
 
The map opens on the screen.
 
The map opens on the screen.
Line 99: Line 99:
 
|-
 
|-
 
|| Click on '''Raster menu>>Extraction>>Clipper'''.
 
|| Click on '''Raster menu>>Extraction>>Clipper'''.
||We will use the '''Clipper''' tool in the '''Raster''' menu to cilp the area.
+
||We will use the '''Clipper''' tool in the '''Raster''' menu to clip the area.
  
 
|-
 
|-
Line 109: Line 109:
 
||Click on the '''Raster '''menu.
 
||Click on the '''Raster '''menu.
  
Click on '''Extraction''' from drop down.
+
Click on '''Extraction''' from drop-down.
  
 
Click on '''Clipper'''.
 
Click on '''Clipper'''.
Line 133: Line 133:
  
 
Click on '''Save '''button.
 
Click on '''Save '''button.
||'''Select the raster file to save the results to''' dialog box opens.
+
||'''Select the raster file to save the results to''' dialog-box opens.
  
 
In the dialog-box, name the file as  '''Clip-DEM.tif'''.
 
In the dialog-box, name the file as  '''Clip-DEM.tif'''.
Line 150: Line 150:
 
Click on '''Extent '''radio button.
 
Click on '''Extent '''radio button.
 
||Under the heading '''Clipping mode''',
 
||Under the heading '''Clipping mode''',
 
+
click on '''Extent''' radio button.
Click on '''Extent''' radio button.
+
  
 
|-
 
|-
Line 161: Line 160:
 
||Switch to the '''QGIS''' window.
 
||Switch to the '''QGIS''' window.
  
The cursor is now seen as plus(+) sign.
+
The cursor is now seen as '''plus'''(+) sign.
  
 
Hold your left mouse button and draw a rectangle covering the area of interest.
 
Hold your left mouse button and draw a rectangle covering the area of interest.
Line 171: Line 170:
 
|-
 
|-
 
|| In the '''Clipper''' dialog-box, check the check-box next to '''Load into canvas when finished'''.
 
|| In the '''Clipper''' dialog-box, check the check-box next to '''Load into canvas when finished'''.
||In the '''Clipper''' dialog-box,
+
||In the '''Clipper''' dialog-box, check the check-box next to '''Load into canvas when finished'''.
 
+
Check the check-box next to '''Load into canvas when finished'''.
+
  
 
|-
 
|-
Line 199: Line 196:
 
|-
 
|-
 
||Uncheck check boxes for '''srtm 51 09, Hillshade, Slope layers'''.
 
||Uncheck check boxes for '''srtm 51 09, Hillshade, Slope layers'''.
||Disable all the layers in the '''Layers Panel''', except '''Clip-DEM layer'''.
+
||Disable all the layers in the '''Layers Panel''', except '''Clip-DEM''' layer.
  
 
|-
 
|-
Line 206: Line 203:
  
 
|-
 
|-
|| Click on the '''Raster''' menu, select '''Extraction''' , from the sub-menu, Click on '''Contour'''.
+
|| Click on the '''Raster''' menu, select '''Extraction''', from the sub-menu, Click on '''Contour'''.
 
||Click on the '''Raster '''menu.
 
||Click on the '''Raster '''menu.
  
Scroll down to '''Extraction''', from the sub-menu, click on '''Contour'''.
+
Scroll down to '''Extraction'''.
 +
 
 +
From the sub-menu, click on '''Contour'''.
  
 
|-
 
|-
Line 217: Line 216:
 
||'''Contour''' dialog-box opens.
 
||'''Contour''' dialog-box opens.
  
From the '''Input file''' drop-down select '''Clip-DEM''' layer.  
+
From the '''Input file''' drop-down, select '''Clip-DEM''' layer.  
  
 
|-
 
|-
Line 225: Line 224:
 
||Click on '''Select '''button for the '''Output file'''.
 
||Click on '''Select '''button for the '''Output file'''.
  
Dialog box opens.
+
Dialog-box opens.
  
 
|-
 
|-
Line 245: Line 244:
 
||Click on the check-box next to '''Attribute name'''.
 
||Click on the check-box next to '''Attribute name'''.
  
Elevation value for each contour line will be recorded as an attribute '''ELEV'''.  
+
Elevation value for each contour line will be recorded as an attribute '''E L E V'''.  
  
 
|-
 
|-
|| Check the box next to '''Load into canvas''' '''when finished'''.
+
|| Check the box next to '''Load into canvas when finished'''.
  
 
Click on '''OK''' button.
 
Click on '''OK''' button.
Line 275: Line 274:
 
Select '''Styles'''.
 
Select '''Styles'''.
  
Rotate the triangle to change the color.
+
Rotate the triangle to change the colour.
||Let us change the color of the contour lines.
+
||Let us change the colour of the contour lines.
  
Right click on '''Contour''' '''Layer'''.
+
Right click on '''Contour''' layer.
  
 
Select '''Styles'''.
 
Select '''Styles'''.
  
Rotate the triangle to change the color.
+
Rotate the triangle to change the colour.
  
Choose the color of your choice.
+
Choose the colour of your choice.
  
 
|-
 
|-
Line 290: Line 289:
  
 
'''srtm 51 09, Clip-DEM '''layer.
 
'''srtm 51 09, Clip-DEM '''layer.
|| Hide the other layers by unchecking the check-boxes in the '''Layers panel'''.
+
|| Hide the other layers by un-checking the check-boxes in the '''Layers panel'''.
  
 
|-
 
|-
Line 299: Line 298:
 
|| Point to '''ELEV''' column on the attribute table.
 
|| Point to '''ELEV''' column on the attribute table.
  
||In the attribute table, each line feature has an attribute named '''ELEV'''.
+
||In the attribute table, each line feature has an attribute named '''E L E V'''.
  
 
The value given in this column is the height in meters for that contour line.
 
The value given in this column is the height in meters for that contour line.
Line 319: Line 318:
  
 
Click on '''Zoom map to the selected rows''' button in the menu bar.
 
Click on '''Zoom map to the selected rows''' button in the menu bar.
||Scroll up and click on the first row to select the first row.
+
||Scroll up and click on the first row to select it
  
 
Click on '''Zoom map to the selected rows''' button on the tool bar.
 
Click on '''Zoom map to the selected rows''' button on the tool bar.
Line 331: Line 330:
 
|-
 
|-
 
|| Point to the highlighted point.
 
|| Point to the highlighted point.
||This is the area of the highest elevation in this dataset.
+
||This is the area of the highest elevation in this '''data-set'''.
  
 
|-
 
|-
Line 393: Line 392:
 
'''Spoken Tutorial Workshops'''
 
'''Spoken Tutorial Workshops'''
  
|| The spoken tutorial project team conducts workshops and gives certificates. For more details please write to us.   
+
|| The spoken tutorial project team conducts workshops and gives certificates.  
 +
 
 +
For more details please write to us.   
  
 
|-
 
|-

Revision as of 19:02, 29 December 2019

Visual Cue Narration
Slide Number 1

Title Slide

Welcome to this tutorial on Create Contour Lines in QGIS.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Clip the area in DEM using the Clipper tool.
  • Show contour lines for the DEM.
  • And mark the highest elevated area on the contour map.
Slide Number 3

System Requirement

Here I am using
  • Ubuntu Linux OS version 16.04
  • QGIS version 2.18
  • And a working Internet connection.
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 file

DEM data required to practise this tutorial is 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 folder.

I have saved this folder on the Desktop.

Double-click on the folder to open it.

Right-click on srtm_51_09.tif file and open with QGIS Desktop. Right-click on srtm.tif file and select Open with QGIS Desktop.

The map opens on the screen.

Click on layer on the menu bar.

Click on Add Layer.

Click on Add Raster layer.

You can also open the tif file using Add Raster Layer option in Layer menu.
Point to the DEM on canvas. On the canvas you will see DEM of the terrain.
Click on Raster menu >>Extraction>>Contour. Contour lines for this DEM can be generated using Contour tool in Raster menu.
Slide Number 6

About Contour lines

It is a line on a map joining points of equal height above or below sea level.

This will help us to determine the highest and least elevated areas on the map.

About Contour lines.

It is a line on a map joining points of equal height above or below sea level.

This will help us to determine the highest and least elevated areas on the map.

Cursor on the map on QGIS interface. We can draw contour lines for the selected area on this map.
Click on Raster menu>>Extraction>>Clipper. We will use the Clipper tool in the Raster menu to clip the area.
Click on the menu item Raster.

Select Extraction from drop down.

Select Clipper.

Click on the Raster menu.

Click on Extraction from drop-down.

Click on Clipper.

Cursor on Clipper dialog-box. Clipper dialog-box opens.
Cursor on Input file field. Select Input file as the DEM layer.

Here, by default this layer is already selected.

Click on Select button next to Output file field. Click on Select button for Output file.
Point to Select the raster file to save the results to dialog box.

In the dialog-box, name the file as Clip-DEM.tif.

Click on Save button.

Select the raster file to save the results to dialog-box opens.

In the dialog-box, name the file as Clip-DEM.tif.

Click on Save button.

In the Clipper dialog-box, check the check-box for No data value. In the Clipper dialog-box, check the check-box for No data value.

Let the value be zero.

Under the heading Clipping mode,

Click on Extent radio button.

Under the heading Clipping mode,

click on Extent radio button.

Cursor on QGIS window.

Point to cursor.

Hold left mouse and draw rectangle over Mumbai region.

Switch to the QGIS window.

The cursor is now seen as plus(+) sign.

Hold your left mouse button and draw a rectangle covering the area of interest.

Point to Mumbai region. For this demonstration I will select Mumbai region.
In the Clipper dialog-box, check the check-box next to Load into canvas when finished. In the Clipper dialog-box, check the check-box next to Load into canvas when finished.
Click on OK button. Keep other default settings as such.

Click on OK button.

Finished dialog-box opens.

Click on OK.

Click OK button in the Qgis.bin dialog-box.

Once the process completes, close the pop-up windows by clicking on OK buttons.
Click on Close button in the Clipper dialog-box. Click on Close button in the Clipper dialog-box.
Point to Clip-DEM layer. On the canvas you will see a new layer loaded.
Uncheck check boxes for srtm 51 09, Hillshade, Slope layers. Disable all the layers in the Layers Panel, except Clip-DEM layer.
Cursor on the map. Now we are ready to generate contour lines for this map using Contour tool.
Click on the Raster menu, select Extraction, from the sub-menu, Click on Contour. Click on the Raster menu.

Scroll down to Extraction.

From the sub-menu, click on Contour.

Cursor on Contour dialog-box.

From the Input file drop-down select Clip-DEM layer.

Contour dialog-box opens.

From the Input file drop-down, select Clip-DEM layer.

Click on Select button next to Output file field.

Select the raster file to save the results to dialog box opens.

Click on Select button for the Output file.

Dialog-box opens.

Name the file as Contour.shp.

Click on Save button.

In the dialog-box, name the file as Contour.shp.

Click on Save button.

In the Contour dialog box, select Interval between contour lines as 50. In the Contour dialog box, select Interval between contour lines as 50.

This will generate contour lines for 50 meter intervals.

Click on the check-box next to Attribute name. Click on the check-box next to Attribute name.

Elevation value for each contour line will be recorded as an attribute E L E V.

Check the box next to Load into canvas when finished.

Click on OK button.

Check the box next to Load into canvas when finished.

Click on OK button.

Finished dialog-box opens.

Click on OK.

Click OK button in the Qgis.bin dialog-box.

Once the process completes, close the pop-up windows by clicking on OK buttons.
Click on Close button. Click on Close button to close the Contour dialog-box.
Cursor on Contour layer. A new layer Contour is added in the Layers panel.
Right click on Contour Layer.

Select Styles.

Rotate the triangle to change the colour.

Let us change the colour of the contour lines.

Right click on Contour layer.

Select Styles.

Rotate the triangle to change the colour.

Choose the colour of your choice.

Uncheck check boxes for

srtm 51 09, Clip-DEM layer.

Hide the other layers by un-checking the check-boxes in the Layers panel.
Right-click on the Contour layer, click on Open Attribute table. Open the Attribute table for the Contour layer.
Point to ELEV column on the attribute table. In the attribute table, each line feature has an attribute named E L E V.

The value given in this column is the height in meters for that contour line.

Click on ELEV column header. Click on the column header a few times to sort the values in descending order.
Point to 1st row. The first row represents the highest elevation in our data.
Point to last row. Scroll down the table, the last row represents the lowest elevation.
Click on the first row.

Click on Zoom map to the selected rows button in the menu bar.

Scroll up and click on the first row to select it

Click on Zoom map to the selected rows button on the tool bar.

Point to map on QGIS canvas. Switch to the QGIS window.

You will see the selected contour line highlighted in yellow.

Point to the highlighted point. This is the area of the highest elevation in this data-set.
Click on “Save As” tool on tool bar.

Type “Contour-Mumbai”

Select “Desktop” as Location.

Click on Save button.

Save this project.

Click on “Save As” tool on the tool bar.

Give an appropriate name.

Save it at a convenient location.

Click on Save button.

Slide Number 7

Summary

Let us summarize,

In this tutorial we have learnt to

  • Clip the area in DEM using the Clipper tool.
  • Show contour lines for the DEM.
  • Mark the highest elevated area on the contour map.
Slide Number 8

Assignment

  • Create contour lines for the area of your choice on the DEM.
  • Find the highest elevation for the area.


Here is the assignment.
  • Create contour lines for the area of your choice on the DEM.
  • Find the highest elevation for the area.
Slide Number 9

About the Spoken Tutorial Project

This video summarizes the Spoken Tutorial project.

Please download and watch it.

Slide Number 10

Spoken Tutorial Workshops

The spoken tutorial project team conducts workshops and gives certificates.

For more details please write to us.

Slide Number 11

Forum for specific question

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

Acknowledgements

The Spoken Tutorial Project is funded by NMEICT, MHRD Government of India.

This tutorial is contributed by Vaishnavi Honap from College of Engineering Pune.

Snehalatha Kaliappan and Himanshi Karwanje from IIT Bombay.

Thank you for joining.

Contributors and Content Editors

Karwanjehimanshi95, Nancyvarkey