QGIS/C2/Importing-Spreadsheets/English-timed

From Script | Spoken-Tutorial
Revision as of 11:06, 15 September 2020 by PoojaMoolya (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Time Narration
00:01 Welcome to this tutorial on Importing spreadsheets in QGIS.
00:07 In this tutorial, we will learn to,
00:10 Import spreadsheets in CSV format to create a Point Layer.
00:16 Convert Point Layer to a Polyline Layer and
00:20 Load WMS (Web Map Service) layer in QGIS.
00:25 To record this tutorial, I am using,

Ubuntu Linux OS version 16.04.

00:32 QGIS version 2.18.
00:36 And a Working internet connection.
00:39 To follow this tutorial you should be familiar with QGIS interface.
00:47 If not for relevant tutorials please visit our website.
00:52 Often GIS data is available in table or spreadsheet format
00:59 Data in the form of spreadsheet can be imported to QGIS.
01:05 Data file must have 2 columns which contain the X and Y coordinates.
01:12 To practise this tutorial you need to download the folder given in Code files link, located below the player.
01:21 Extract the contents of the downloaded zip file.
01:25 Locate Places.txt and Places.csv files in the extracted folder.
01:33 I have already downloaded the code file, extracted and saved it in a folder on Desktop.
01:41 I will double-click on Code files folder to view the contents.
01:46 Here you will see 2 files Places.csv and Places.txt.
01:54 Double-click on Places.csv file.
02:02 A spreadsheet in CSV format opens.
02:06 It has names of cities with latitude and longitude data.
02:14 Close the CSV file.
02:17 Double-click and open Places.txt file.
02:22 Here too, we have names of cities, with longitude and latitude data.
02:32 Close the text file.
02:35 Close the Code-files folder and open QGIS interface.
02:41 Click on Layer menu on the menu bar.
02:45 From the drop-down list, select Add layer.
02:49 From the sub-menu, select Add Delimited Text Layer.
02:54 A dialog-box opens.
02:57 Click on Browse button next to File Name text box.
03:02 A dialog-box opens.
03:05 Navigate to the csv file you had downloaded and saved earlier.
03:11 Click on Open button.
03:14 In the create a layer dialog-box, the file path is now seen in the File Name text box.
03:21 In the File format section, by default CSV option gets selected.
03:28 If not, click on CSV radio button to select it.
03:33 When you use .txt file, select Custom Delimiters option.
03:39 Geometry definition section will be auto-populated with Latitude and Longitude data.
03:47 Please note X-coordinate is longitude and Y-coordinate is latitude.
03:55 Longitude specifies the east-west position of a point.
04:01 And Latitude specifies the north-south position of a point.
04:06 Click on OK button.
04:09 Coordinate Reference System Selector dialog-box opens.
04:14 Select WGS 84 EPSG 4326.
04:21 Click on OK button.
04:24 The data is imported and displayed on QGIS canvas.
04:30 A map of India opens with points.
04:34 These points correspond to different cities listed in the CSV file.
04:40 The style and color of these point features can be changed.
04:45 This will be demonstrated in detail in the upcoming tutorials.
04:51 As an assignment,
04:53 Import Places.txt file in QGIS.
04:58 Places.txt file is available in the folder downloaded from Code files link.
05:06 Now let us convert this Point layer to Polyline layer.
05:12 Here we will connect all the cities with a path.
05:17 The path connects southern-most city to the northern-most city.
05:23 This is based on latitude data of each city.
05:28 Click on Processing menu on the menu bar.
05:32 From the drop-down select Toolbox.
05:36 Processing Toolbox panel opens on the right-side of the screen.
05:41 It shows the list of all available algorithms grouped in different blocks.
05:47 Expand QGIS geoalgorithm by clicking on the black triangle next to it.
05:55 From the displayed list, expand Vector creation tools option.
06:01 From the expanded menu, double click on Points to path tool to execute the algorithm.
06:08 Points to path dialog-box opens.
06:12 Select Input layer as Places.
06:16 From the Group field drop-down, select type comma C comma 16.
06:23 This field contains the names of the cities for all the features in the shape file.
06:29 From the Order field drop-down, select Latitude comma N comma 19 comma 11.
06:37 This denotes the path will go in the ascending order of the latitude.
06:42 Click on the button next to Paths field.
06:46 From the sub-menu select Save to file option.
06:51 Save file dialog-box opens.
06:55 Select a suitable location to save the file. I will select Desktop.
07:02 Name the file as Path-1.
07:06 Click on Save button.
07:09 The path with file-name, appears on the Paths field.
07:14 Click the check box for Open output file after running algorithm.
07:19 Click on Run button at the bottom right corner of the dialog-box.
07:24 Notice the map on the canvas.
07:27 The output path between the cities is shown.
07:31 Using this algorithm any two points on the map can be connected by a path.
07:38 As an Assignment, Create a path between the cities from West to East.
07:45 Hint: In the Points to path dialog-box, Order field drop-down use Longitude comma N comma 19 comma 11 option.
07:57 Now let us add a WMS layer in QGIS.
08:03 About WMS
08:06 WMS stands for Web Map Services.
08:11 WMS is an open GIS standard specification for interactive mapping.
08:17 This is based on requesting map images from a server over the Internet.
08:23 For this demonstration you must be connected to the Internet.
08:28 Open any web browser.
08:31 In the address bar type bhuvan.nrsc.gov.in

Press Enter.

08:41 Bhuvan home page opens.
08:44 Click on Thematic Services tab.
08:48 Thematic Services page opens in a new window.
08:52 In the left panel, under Search tab, under Select Theme drop-down,

choose Land Use Land Cover (50K):2005-06 .

09:06 Under Select Geography drop-down, choose Karnataka.
09:12 Click on the Web Services tab.
09:15 Under section For QGIS, uDig, ArcGIS and Other Users, Web Map Service (WMS)URL
09:25 Note the Layer id for this layer. And highlight the URL.
09:31 Right-click and copy the URL.
09:36 Back to QGIS interface,

In the Layers panel, uncheck the Paths and Place layers to hide them.

09:47 Click on Layer menu on the menu bar, from the drop-down, select Add Layer.
09:55 From the sub-menu, Select Add WMS/WMTS layer.
10:01 Add Layer dialog-box opens.
10:04 In the Layers tab click on New button.
10:08 Create a new WMS Connection dialog-box opens.
10:13 In Name field type Bhuvan.
10:16 In the URL field, paste the copied URL link from the Bhuvan website.
10:23 Click on OK button at the bottom-right corner of the dialog-box.
10:29 In the Save Connection dialog-box, click on OK button.
10:34 In the Add Layers dialog-box, click on Connect button.
10:40 In the id section, select id 971.
10:46 This id corresponds to to the id layer of the WMS layer from Bhuvan website.
10:53 Click on Add button at the bottom-right corner of the dialog-box.
10:59 Click on Close button.
11:02 On canvas, the Land Use Land Cover layer for Karnataka is displayed.
11:08 Similarly we can load any available layer of different themes.
11:15 Let us summarize,

In this tutorial we have learnt to

11:21 Import spreadsheets in CSV format to create a Point Layer
11:27 Convert Point Layer to a Polyline Layer and,
11:31 Load WMS (Web Map Service) layer from Bhuvan website in QGIS.
11:47 The video at the following link summarizes the Spoken Tutorial project.

Please download and watch it.

11:45 The Spoken Tutorial Project team: conducts workshops using spoken tutorials and gives certificates on passing online tests.

For more details, please write to us.

11:58 Please post your timed queries on this forum.
12:02 Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.

More information on this mission is available at this link.

12:14 This tutorial is contributed by Prajwal M from NIT Suratkal and Snehalatha from IIT Bombay.

Thank you for joining.

Contributors and Content Editors

PoojaMoolya, Sakinashaikh