Difference between revisions of "QGIS/C2/Vector-Data-Styling/English"
Snehalathak (Talk | contribs) (Created page with " {|border=1 ||'''Visual Cue''' ||'''Narration''' |- || '''Slide Number 1''' '''Title Slide''' ||Welcome to this tutorial on '''Vector Data Styling''' in '''QGIS'''. |- || ''...") |
|||
Line 1: | Line 1: | ||
− | |||
{|border=1 | {|border=1 | ||
||'''Visual Cue''' | ||'''Visual Cue''' | ||
Line 50: | Line 49: | ||
Extract the contents of the downloaded zip file. | Extract the contents of the downloaded zip file. | ||
− | Locate''' world.shp '''file in the extracted folder. | + | Locate '''world.shp''' file in the extracted folder. |
|- | |- | ||
|| Show the map on desktop. | || Show the map on desktop. | ||
− | || I have already downloaded the code file, extracted and saved in a folder on | + | || I have already downloaded the code file, extracted and saved in a folder on '''Desktop'''. |
|- | |- | ||
Line 66: | Line 65: | ||
Right-click on '''world.shp '''file. | Right-click on '''world.shp '''file. | ||
− | From the context menu, select '''Open with QGIS Desktop '''option. | + | From the context menu, select '''Open with QGIS Desktop ''' option. |
|- | |- | ||
||Cursor on the QGIS interface. | ||Cursor on the QGIS interface. | ||
− | Cursor on QGIS tips dialog-box. | + | Cursor on '''QGIS tips''' dialog-box. |
− | Click on OK button | + | Click on '''OK''' button |
|| QGIS interface opens. | || QGIS interface opens. | ||
− | QGIS | + | '''QGIS Tips''' dialog-box opens. |
− | Click on OK button to close the dialog-box. | + | Click on '''OK''' button to close the dialog-box. |
|- | |- | ||
||Cursor on the map. | ||Cursor on the map. | ||
− | ||World map | + | ||World map loads on the canvas in the default style. |
|- | |- | ||
||Point to the '''world''' layer in the '''Layers panel'''. | ||Point to the '''world''' layer in the '''Layers panel'''. | ||
− | ||You can see the''' world '''layer in the '''Layers Panel'''. | + | ||You can see the '''world''' layer in the '''Layers Panel'''. |
|- | |- | ||
Line 108: | Line 107: | ||
Point to '''ADMIN''' column. | Point to '''ADMIN''' column. | ||
||Here we can see all the data of various features embedded in row and column format. | ||Here we can see all the data of various features embedded in row and column format. | ||
− | |||
The country names are given in the '''ADMIN''' column. | The country names are given in the '''ADMIN''' column. | ||
Line 114: | Line 112: | ||
|- | |- | ||
||Drag the slider at bottom of the table towards right. | ||Drag the slider at bottom of the table towards right. | ||
− | ||Drag the slider at bottom of the table and navigate to '''POP_EST '''column. | + | ||Drag the slider at bottom of the table and navigate to '''POP_EST ''' column. |
|- | |- | ||
|| Navigate to '''POP_EST''' column. | || Navigate to '''POP_EST''' column. | ||
− | |||
Scroll down the list. | Scroll down the list. | ||
− | || | + | || In this column population for various countries is listed. |
− | + | ||
− | In this column population for various countries is listed. | + | |
|- | |- | ||
Line 149: | Line 144: | ||
|- | |- | ||
||Click on '''Style''' tab from the left panel. | ||Click on '''Style''' tab from the left panel. | ||
− | ||Click on '''Style '''tab from the left panel. | + | ||Click on '''Style ''' tab from the left panel. |
Line 161: | Line 156: | ||
||Point towards the various options | ||Point towards the various options | ||
||You will see various styling options here. | ||You will see various styling options here. | ||
− | |||
We will explore the first three in this tutorial. | We will explore the first three in this tutorial. | ||
Line 185: | Line 179: | ||
|- | |- | ||
||Cursor on the dialog-box. | ||Cursor on the dialog-box. | ||
− | |||
||Since this is a polygon dataset, we have two basic choices. | ||Since this is a polygon dataset, we have two basic choices. | ||
Line 194: | Line 187: | ||
|- | |- | ||
||Cursor on the dialog-box. | ||Cursor on the dialog-box. | ||
− | ||Outline color, style and width can also be changed. | + | ||'''Outline''' color, style and width can also be changed. |
|- | |- | ||
||Click on the drop-down arrow next to '''Fill drop-down'''. | ||Click on the drop-down arrow next to '''Fill drop-down'''. | ||
+ | |||
Rotate the color triangle. | Rotate the color triangle. | ||
+ | |||
Choose blue color. | Choose blue color. | ||
Line 207: | Line 202: | ||
I will choose blue color. | I will choose blue color. | ||
− | |||
− | |||
|- | |- | ||
− | ||Click on the drop-down arrow next to '''Outline '''text box. | + | ||Click on the drop-down arrow next to '''Outline ''' text box. |
Drag the color triangle to choose the yellow color. | Drag the color triangle to choose the yellow color. | ||
− | || Similarly, Select''' | + | || Similarly, Select ''' Outline''' color. |
Line 280: | Line 273: | ||
|- | |- | ||
||Cursor on '''Layers Properties''' dialog-box. | ||Cursor on '''Layers Properties''' dialog-box. | ||
− | |||
||'''Categorized''' means, the features in the layer will be shown in different shades of a color. | ||'''Categorized''' means, the features in the layer will be shown in different shades of a color. | ||
These color shades are based on the unique values in the '''attribute fields'''. | These color shades are based on the unique values in the '''attribute fields'''. | ||
− | |||
− | |||
− | |||
|- | |- | ||
Line 343: | Line 332: | ||
|- | |- | ||
||Select '''POP_EST''' | ||Select '''POP_EST''' | ||
− | |||
||From the '''Column''' drop-down, select '''POP_EST'''. | ||From the '''Column''' drop-down, select '''POP_EST'''. | ||
Line 357: | Line 345: | ||
|- | |- | ||
− | ||Click on Classify button. | + | ||Click on '''Classify''' button. |
||Click on '''Classify''' button. | ||Click on '''Classify''' button. | ||
Line 382: | Line 370: | ||
|- | |- | ||
||Cursor on screen. | ||Cursor on screen. | ||
− | || | + | ||The numerical values can be Integer or Real values. |
'''Attribute''' field with '''String type '''cannot be used with this styling option. | '''Attribute''' field with '''String type '''cannot be used with this styling option. | ||
Line 392: | Line 380: | ||
|- | |- | ||
||Point to the map. | ||Point to the map. | ||
− | |||
||Now on the map you will see countries in 3 different shades of blue. | ||Now on the map you will see countries in 3 different shades of blue. | ||
Line 415: | Line 402: | ||
|- | |- | ||
||Double-click on the colored box under '''Symbol''' under '''Classes''' tab. | ||Double-click on the colored box under '''Symbol''' under '''Classes''' tab. | ||
− | ||In '''Classes''' tab, under '''Symbol''' column , double-click on the colored box. | + | ||In '''Classes''' tab, under '''Symbol''' column, double-click on the colored box. |
|- | |- | ||
Line 423: | Line 410: | ||
|- | |- | ||
||In the '''Color''' drop-down option, click on the drop-down arrow. | ||In the '''Color''' drop-down option, click on the drop-down arrow. | ||
− | |||
− | |||
− | |||
||In the '''Color''' drop-down option, click on the drop-down arrow. | ||In the '''Color''' drop-down option, click on the drop-down arrow. | ||
Color triangle opens. | Color triangle opens. | ||
|- | |- | ||
− | ||Rotate the color triangle | + | ||Rotate the color triangle >> select red color. |
||Rotate the color triangle to choose the required color. | ||Rotate the color triangle to choose the required color. | ||
Line 497: | Line 481: | ||
|- | |- | ||
||Point to '''Layers Panel'''. | ||Point to '''Layers Panel'''. | ||
− | |||
− | |||
− | |||
||Observe the '''Layers Panel'''. | ||Observe the '''Layers Panel'''. | ||
There are clearly marked class names and | There are clearly marked class names and | ||
− | |||
colors to represent our interpretation of the population values. | colors to represent our interpretation of the population values. | ||
Line 545: | Line 525: | ||
|| In the style menu, Select '''Buffer'''. | || In the style menu, Select '''Buffer'''. | ||
− | Check the '''Draw text buffer '''check box. | + | Check the '''Draw text buffer ''' check box. |
|- | |- | ||
Line 602: | Line 582: | ||
||* The video at the following link summarises the spoken tutorial project. | ||* The video at the following link summarises the spoken tutorial project. | ||
* Please download and watch it. | * Please download and watch it. | ||
− | |||
− | |||
|- | |- | ||
Line 611: | Line 589: | ||
||* The spoken tutorial project team conducts workshops and gives certificates on passing online tests | ||* The spoken tutorial project team conducts workshops and gives certificates on passing online tests | ||
* For more details please write to us. | * For more details please write to us. | ||
− | |||
− | |||
− | |||
|- | |- | ||
||'''Slide number 10''' | ||'''Slide number 10''' | ||
'''Forum for specific questions:''' | '''Forum for specific questions:''' | ||
− | |||
− | |||
||Please post your timed queries on this forum. | ||Please post your timed queries on this forum. | ||
Line 637: | Line 610: | ||
Thank you for joining. | Thank you for joining. | ||
− | + | |- | |
|} | |} |
Revision as of 11:13, 11 December 2018
Visual Cue | Narration |
Slide Number 1
Title Slide |
Welcome to this tutorial on Vector Data Styling in QGIS. |
Slide Number 2
Learning Objectives |
In this tutorial we will learn to,
|
Slide Number 3
System Requirement |
To record this tutorial I am using,
Ubuntu Linux OS version 16.04. QGIS version 2.18. |
Slide Number 4
Pre-requisites www.spoken-tutorial.org. |
To follow this tutorial you should be familiar with QGIS interface.
If not, For relevant tutorials, visit our website. |
Slide Number 5
Example map to practise |
To practise this tutorial,
you need to download the folder given in the code-files link, located below the player. Extract the contents of the downloaded zip file. Locate world.shp file in the extracted folder. |
Show the map on desktop. | I have already downloaded the code file, extracted and saved in a folder on Desktop. |
Double-click on code-files folder.
Right-click on world.shp file. From the context menu select Open with, QGIS Desktop. |
Double-click on the code-file folder to open it.
Right-click on world.shp file. From the context menu, select Open with QGIS Desktop option. |
Cursor on the QGIS interface.
Cursor on QGIS tips dialog-box.
|
QGIS interface opens.
QGIS Tips dialog-box opens. Click on OK button to close the dialog-box. |
Cursor on the map. | World map loads on the canvas in the default style. |
Point to the world layer in the Layers panel. | You can see the world layer in the Layers Panel. |
Right-click on the layer name in the layer panel.
Select attribute table from the context menu. |
Right-click on the world layer.
|
Cursor on attribute table. | Attribute table for this layer opens. |
Point to columns.
|
Here we can see all the data of various features embedded in row and column format.
The country names are given in the ADMIN column. |
Drag the slider at bottom of the table towards right. | Drag the slider at bottom of the table and navigate to POP_EST column. |
Navigate to POP_EST column.
Scroll down the list. |
In this column population for various countries is listed. |
Cursor on the POP_EST column. | Next, we will depict the population data shown here, in various styles on the world map. |
Click on the red x mark on the top-left corner. | Close the attribute table. |
Right click the layer in the layer panel.
|
Right click on the world layer.
|
Cursor on the window. | Layer Properties dialog-box opens. |
Click on Style tab from the left panel. | Click on Style tab from the left panel.
|
Click on drop down button. | Click on the drop-down button located on the top left corner of the dialog-box. |
Point towards the various options | You will see various styling options here.
We will explore the first three in this tutorial. |
Select Single Symbol option. | Select Single Symbol option.
|
Click on add Symbol layer button (+ button) under Fillpanel. | Click on add Symbol layer button available under Fillpanel. |
Point to options. | Various style options appear below Symbol layer type. |
Cursor on the dialog-box. | Since this is a polygon dataset, we have two basic choices. |
Cursor on the dialog-box. | You can fill the polygon with the color and fill style of your choice. |
Cursor on the dialog-box. | Outline color, style and width can also be changed. |
Click on the drop-down arrow next to Fill drop-down.
Rotate the color triangle. Choose blue color. |
Click on the drop-down arrow next to Fill drop-down.
I will choose blue color. |
Click on the drop-down arrow next to Outline text box.
|
Similarly, Select Outline color.
|
Click on the drop-down arrow next to Fill Style text box.
|
Fill style as Dense1. |
Click on the drop-down arrow next to Outline style text box.
|
Outline style, solid line. |
Click on the drop-down arrow next to Outline width text box. | Outline width, 0.46 millimeters. |
Various other style options are available to explore. | |
Click on OK button. | After you have completed the styling,
|
Point to the map on the canvas. | On the canvas,
|
Cursor on the canvas. | Now we will see how to map the population data. |
Cursor on the canvas. | The Single Symbol style is not very useful in mapping the population data. |
Right click on world layer,
Select Properties option. |
Let us explore another styling option.
|
In the Layers Properties dialog-box, choose Categorized from the Style tab. | In the Layers Properties dialog-box,
this time we will choose Categorized from the Style tab. |
Cursor on Layers Properties dialog-box. | Categorized means, the features in the layer will be shown in different shades of a color.
These color shades are based on the unique values in the attribute fields. |
In the Column drop down, select POP_EST value. | Since we are trying to map population data, in the Column drop down we will select POP_EST. |
Select a colour ramp. | Choose a colour ramp of your choice from the drop-down.
I will choose Blues. |
Click on Classify button at the bottom of the middle panel. | Click on Classify button at the bottom of the middle panel.
The panel in the middle shows various classes with corresponding values. |
Click on OK button. | Click on OK button at the bottom right corner. |
Cursor on the map. | On the world map, you will see different countries appearing in shades of blue.
Scroll down the central mouse button to zoom-in and zoom-out the map. Lighter shades represent lower population. Darker shades represent higher population. |
Right click on world layer.
Click Properties option. |
Once again open Layers Properties dialog-box.
In Style tab, click on drop drown button. |
Click on the drop-down button.
Click on Graduated option. |
Let us explore the Graduated symbology.
Select Graduated option. |
Cursor on the dialog-box. | Graduated symbology type allows you to break down the data in a column in unique classes.
We can choose a different style for each of the classes. |
Select POP_EST | From the Column drop-down, select POP_EST. |
Click on the black triangle next to Classes text box. | We can think of classifying our population data into 3 classes, Low, Medium and High.
So, under Classes drop-down, select 3. |
Point to the panel. | You will see that 3 classes show up in the panel with corresponding values. |
Click on Classify button. | Click on Classify button. |
Click on Mode drop-down.
Point towards the modes. Select Quantile option. |
Click on Mode drop-down.
There are many Mode options available here. To keep things simple, let us use the Quantile mode. |
Point towards the modes. | These modes use different statistical algorithms to break down the data into separate classes. |
Cursor on the screen. | Also note that for an attribute to be used in Graduated style, it must be numeric field. |
Cursor on screen. | The numerical values can be Integer or Real values.
Attribute field with String type cannot be used with this styling option. |
Click on OK button. | Click on OK button. |
Point to the map. | Now on the map you will see countries in 3 different shades of blue.
These color shades represents the population data for the country. |
Point to Layers Panel. | On the Layers Panel you will see 3 classes for this layer. |
Cursor on the map. | There are some more styling options available.
We can choose a different style and color for each of these classes. |
Right click on world layer.
Click Properties option. |
Open Layer Properties dialog-box again. |
Double-click on the colored box under Symbol under Classes tab. | In Classes tab, under Symbol column, double-click on the colored box. |
Cursor on Symbol Selector dialog-box. | Symbol Selector dialog-box opens. |
In the Color drop-down option, click on the drop-down arrow. | In the Color drop-down option, click on the drop-down arrow.
Color triangle opens. |
Rotate the color triangle >> select red color. | Rotate the color triangle to choose the required color.
I will choose red color to indicate low population. |
Click on OK button at the bottom of Symbol selector dialog-box. | Click on OK button in the Symbol selector dialog-box. |
Double-click on the colored box under Symbol under Classes tab.
In the Color drop-down option, click on the drop-down arrow. Rotate the color triangle and select the color. |
Similarly change the color for other two classes.
I will choose yellow for the medium and green for high. |
Double-click on the first row in Legend column.
Type low for the first row. |
Double-click on the first row in the Legend column.
Type low for the first row. |
Double-click on the second row in the Legend column.
Type Medium for the second row. |
Type Medium for the second row. |
Double-click on the third row in the Legend column.
Type High for the third row. |
And High for the third row. |
Double-click on the first row in the Value column. | Double-click on the first row in the Value column to edit the selected ranges. |
Cursor on the Enter class bounds text box.
|
Enter class bounds text box opens.
If you wish, you may edit lower value and upper value. For now we will leave the values unchanged. Click on OK button. |
Click on OK button in the Layer Properties dialog box. | Click on OK button in the Layer Properties dialog box. |
Point to world map. | Observe the world map.
|
Point to Layers Panel. | Observe the Layers Panel.
colors to represent our interpretation of the population values. |
Cursor on the map. | This style conveys a lot more useful map than the previous two attempts. |
Cursor on the map. | Let us learn how to label different features in a vector file.
For demonstration let us label the names of the countries. |
Right click on world
Click properties |
Open Layer Properties dialog box again.
|
Select Show labels for this layer in the first text box drop-down. | In the first text box drop-down, select Show labels for this layer. |
Select ADMIN in Label with drop down. | ADMIN column in the attribute table has list of the names of the countries.
So in the Label with drop down, select ADMIN. |
Select Buffer.
Check the check box for Draw text buffer. |
In the style menu, Select Buffer.
Check the Draw text buffer check box. |
Click on Size drop-down.
Click on Color drop-down. |
Size of the text can be changed according to requirement.
Select a color from the color drop-down. |
Click on OK button. | Click on OK button. |
Cursor on the map. | On the world-map we can see the names of countries displayed. |
Slide Number 6
Summary |
Let us summarize,
In this tutorial we have learnt to
Single symbol styling Categorized styling Graduated styling, and
|
Slide Number 7
Assignment |
As an assignment,
Categorise the data set POP_EST into 5 classes. Use Graduated styling method, Equal Interval mode. |
Point to the Assignments shown on screen. | Your completed assignment should look as shown here. |
Slide Number 8
About the Spoken Tutorial Project |
* The video at the following link summarises the spoken tutorial project.
|
Slide Number 9
Spoken Tutorial Workshops |
* The spoken tutorial project team conducts workshops and gives certificates on passing online tests
|
Slide number 10
Forum for specific questions: |
Please post your timed queries on this forum. |
Slide number 11
Acknowledgements |
The Spoken Tutorial Project is funded by NMEICT, MHRD Government of India.
More information on this mission is available at the following link. |
This is contributed by Prajwal.M from NIT Surathkal and Snehalatha from IIT Bombay.
|