0% found this document useful (0 votes)
459 views152 pages

Qgis Lab Report Full Review

This lab report documents students' work in QGIS on layer styling, labelling, and print map design. The report is divided into four parts: 1) Layer styling where students add water, land, and roads layers from an OSM database and style each layer with different colors and widths. Market shop icons are also added. 2) Labelling where labels are added to identify market shops and roads. 3) Print map design where students design a print layout of their QGIS map. 4) Results which provides an overview of what was accomplished in the lab. The objective is for students to learn basic QGIS tools for data management, styling, labelling
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
459 views152 pages

Qgis Lab Report Full Review

This lab report documents students' work in QGIS on layer styling, labelling, and print map design. The report is divided into four parts: 1) Layer styling where students add water, land, and roads layers from an OSM database and style each layer with different colors and widths. Market shop icons are also added. 2) Labelling where labels are added to identify market shops and roads. 3) Print map design where students design a print layout of their QGIS map. 4) Results which provides an overview of what was accomplished in the lab. The objective is for students to learn basic QGIS tools for data management, styling, labelling
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 152

UNIVERSITI TEKNOLOGI MARA

SCHOOL OF GEOMATICS SCIENCE & NATURAL RESOURCES


COLLEGE OF BUILT ENVIRONMENTAL

LAB: QUANTUM GIS (QGIS) LAB REPORT

PREPARED BY:

NAME STUDENT ID

NURULIZZATI AIN BINTI IDRUS 2023817258

YUSNITA BINTI YUSOF 2023836422

NORAIN MARDIAH BINTI SAIFUL FAHZRIN 2023473848

PREPARED FOR:
DR. ROSLINA BINTI IDRIS

DATE OF SUBMISSION:
19 NOVEMBER 2023
TABLE OF CONTENT
NO. CONTENT PAGE
1 Introduction 1
2 LAB 1: Layer Styling and Labelling 2
Part 1: Layer Styling 2
1.1 Adding Market Shop Icon 15
Part 2: Labelling 17
1.2 Adding Labels to Market Shops 17
1.3 Adding Labels to The Roads 22
Part 3: Print Map Design 27
Result 31
3 LAB 2: Symbol, Colour, and Map Layout 32
Part 1: Layer Styling 32
1.1 Changing the Projection 42
Part 2: Labelling 44
2.1 Adding Labels to The Countries 44
2.2 Adding Leader Lines 47
Part 3: Map Design 51
3.1 Creating A New Print Layout 53
3.2 Modifying the Default Legend 55
Result 57
4 LAB 3: Layer Styling and Labelling 58
Part 1: Layer Styling 58
3.1 Adding More Detailed Rules 63
3.1.1 Motorway 65
3.1.2 Trunk and Primary 67
3.1.3 Road 69
3.1.4 Minor Road 72
3.1.5 2nd Minor Road 74
3.1.6 Road Bridges 75
3.1.7 Road Bridges 2 77
3.1.8 Road Bridges 1 78
3.1.9 Scale: Minor Road 1 79
Scale: Minor Road 2 80
3.1.10 River 1 80
3.1.11 River 2 83
3.1.12 Motorway Bridge 84
3.1.13 Motorway Bridge 2 & 1 85
3.1.14 Motorway 86
3.1.15 Motorway Tunnel 87
3.1.16 Trunk and Primary Bridge 89
3.1.17 Trunk & Primary Bridge 2 90
3.1.18 Trunk & Primary Bridge 1 91
3.1.19 Trunk & Primary 92
3.2 Understanding Road Symbol 94
Part 2: Labelling 98
3.3 Labels for Road 98
3.4 Fine-Tuning & Road Preferences Codes 102
3.5 Labels for Areas 104
3.6 Finishing Touches 108
3.7 Map Design 112
Result 114
5 LAB 4: Layer Styling in Colour & Setting 115
Part 1: Layer Styling 115
1.1 School Globe Style with Country Shading 117
1.2 Map Layout 123
Result 128
Bonus Recipe 129
Part 2: Labelling 140
2.1 Styling the Labels 140
Part 3: Map Design 146
Result 148
6 Conclusion 149
INTRODUCTION

Quantum Geographic Information System known as QGIS was an open-source program and
free to access. This program enables the users to create, edit, visualize, analyze, and publish
geospatial information.

The use of QGIS has several advantages which is the program provides an abundance of free
web materials and downloadable maps. Also, numerous vector file types are supported by
QGIS. Vector data is stored as either point, line, or polygon features. Lastly, there is a wide
range of plug-ins available for usage, and new plug-ins are constantly being developed. Plug-
ins are add-on programs that might be downloaded to finish a particular activity that would be
difficult to perform. Print Layout is used with QGIS to produce printed maps. It may be applied
to add legends, labels, and different map views.

This report was consisting of all four given tasks that need to be submitted by students with the
help of a manual. The objective of this project is to train the students in the use of QGIS
software and to explore all the functions or tools that might be used to create a good map.

1
LAB 1:
LAYER STYLING AND LABELLING

AIM:

The aim for Lab 1 is to familiarize students with the basic tools in QGIS. Students also will be
taught how to insert data into the software, filter the layer with expression, play with the colour,
add icons to the maps, place the labels and to design the print map.

MANUAL:
PART 1 LAYER STYLING

1. First thing first, open the QGIS software and go to layer tab. Click the “Add Layer” and
Add Vector Layer as shown below.

2
2. Choose the seattle_osm database from geodata folder when the vector dataset display
appears. OSM stands for Open Street Map. Then click open to open the water data.

3. In the data source manager, go to Vector and set the source type as File, the source is
according to the database file location and click add.

3
4. After that, students could see the water data had been successfully uploaded.

5. Next, go to Layer tab again and click on “Add Layer”. This time chose the Add XYZ Layer.

4
6. In the XYZ section, choose OpenStreetMap from the drop-down menu and click Load and
Add.

7. The QGIS interface will show the Seattle OSM as it is successfully loaded.

5
8. Use the query builder in layer properties that is in Source to filter the multipolygons. Make
sure the current layer should be “seattle_osm - multipolygons”.

9. Filter the multipolygons with the expression: “natural” = ‘water’ AND “amenity” IS NULL.
The wording and operation can be selected from the given field and operators. Click OK to
add it to map.

6
10. Also, name this current layer as water. Carry out the styling by changing the fill colors and
stroke style to No Pen in the Symbology section. For now, set the HTML notation or water
layer to blue -gray #dee8e8 and click OK.

11. Make a copy of the water layer and name it as Land.

7
12. Open the layer properties and symbology the do layer styling. Select inverted polygons and
layer rendering.

8
13. Start to style the Land layer by setting the fill color as #dbc8af and stroke color #6d5943
with its width 0.7.

9
14. Next, students must change the map’s coordinate reference system to EPSG:102348 in the
CRS section. Click Apply.

10
15. Roughly zoom to the area around the Seattle ferry terminals in downtown Seattle or just
insert the coordinate 386854,68228.

11
16. Now, add another layer from the Seattle OSM and use query builder to express following
equation: “highway” NOT NULL and click OK.

17. Now this layer is the roads layer. Carry out the styling by using the #cebb9f color notation
and set the width of lines to 0.7.

12
18. Students may also change the road’s color to any color according to the creativity so that
the map looks more interesting.

13
19. If students would like some extra textural effect, use the Layer Rendering in Layer Styling
Panel to try the feature blending mode and Burn with an opacity of 60%. Click OK.

The result of Feature Blending Mode

14
1.1 ADDING MARKET SHOP ICON

20. Next step was to add Market Icons onto the map since the students decided to go with this
theme. Start this styling by adding the points layer from Seattle OSM database and use
query builder to express following expression: “other_tags” LIKE “market”.

21. In the points layer properties at symbology section, set the renderer as Single symbol,
change the marker from Simple marker to SVG marker and click OK.

15
22. After that, students may use their own creativity to design the map with any color and
opacity. Click apply to display it on the map.

16
The figure below shows the updated basket icon.

PART 2 LABELLING

2.1 ADDING LABELS TO THE MARKET SHOPS


23. This step is a bonus in decorating the map called Rule-based styling. This section illustrates
how to create separate symbology for features in the same dataset. This styling makes
project management straightforward and uncomplicated. In the layer styling, choose rule-
based renderer like shown below.

17
24. In the panel of rule-based styles, copy and paste the first item so that there are two identical
rules. Right click on the item and take note of the other available options. Double click the
first item to bring up the Edit Rule section and put Groceries in Label input box. Set the id
as Aggregates. Key in the expression for the first rule by clicking at the epsilon. The first
expression would be “name” = “GROCERIES”

25. Students may do some editing to the symbol according to Rule layering.

18
26. Next, the second rule should be labeled Other with following filter: “name” <> ‘groceries’
and click OK to apply it onto the map.

27. The figure below shows how it would look once the label is completed.

19
28. The students have made some changes to the description which students have changed the groceries
to QFC.

20
29. Besides that, the colour used, text, buffer and placement can be adjusted by selecting the given
options.

30. Design the map with any suitable font, size, colour, and opacity to make it look interesting.

21
31. Use the buffer tool to adjust the appropriate distance between the label and the icon.

2.2 ADDING LABELS TO THE ROADS

32. Make sure the road layer is the current layer for now. Choose Single label from the drop-
down menu.

22
33. Students also want to abbreviate road names that include “Street”. To carry out this step,
express the following expressions in the Label with box: replace (name, ‘street’, ‘St.’).
Select the id as aggregates and click OK.

34. Change the text colour to something a bit darker than the roads, but still within the same
hue. Students had used #9c8e7b for the colour and size 6 of arial font.

23
35. For the text buffers, apply 0.5-millimetre buffer and as with the coffee shop buffers. Use
the same colour for the buffer as the predominant background colour is the land colour.

Figure below shows the feature parts are each labelled individually even though they represent
the same street.

24
36. Use the Rendering submenu and tick the Merge connected lines to avoid duplicate labels
option.

37. Students may also tick at the Limit number of features to be labelled to and choose any
appropriate numbering.

25
38. Last but not least, students have made some editing and styling to the labelling as to make it nicer.

26
PART 3 PRINT MAP DESIGN

39. Now, students must create the layout for the map. Click at the Project and select New Print
Layout. This is to include major customizations including titles and images.

27
40. Students could set the background colour for the page by right clicking the page and use
Page properties with Item properties panel again. Activate the snapping so that all the items
that are added to the layout can stay in alignment with the page. Click the View and Snap
to Grid.

41. Next, click Add a New Map to layout tools and student need to drag an area for the map
according to existing rectangle. To create precisely equal margin, select the Item Properties
then click Position and size and enter 0.500 for X and Y box. For width and height are 7.500
and 10.000 respectively. Make the map in the form of a legend according to the suitability
of the data.

28
42. Student also able to design the map dependent on creativity of students itself. For the
designing the map, click Label Font on Item Properties and choose any font, style, size and
color of text that can beautify the map.

29
43. To make the map more interesting, student could add an image inside the map by using the
Add a new Picture to the layout tool. Then, dragging a rectangle on the layout page and
select the picture that downloaded in PC at Main properties which in Item Properties Tab.
Also, click on Raster image before upload the picture.

30
RESULT:
This is final output of the map according to student’s idea and creativity.

31
LAB 2:

SYMBOL, COLOUR AND MAP LAYOUT

AIM:

The aim for Lab 2 is to create a proportional symbol map. This map is a type of thematic map
that uses map symbols that vary in size to represent a quantitative variable. The lab will
familiarize students with the straightforward symbology and limited colour palettes which are
common in news media. These types of maps become a part of the overall story, quickly
informing the reader of a geographic point of interest and getting out of the way.

MANUAL:

PART 1 LAYER STYLING

1. First thing first, open the QGIS software and go to layer tab. Click the “Add Layer” and
Add Vector Layer as shown below.

32
2. Choose the natural_earth_vector.gpkg database from geodata folder when the vector
dataset display appears. Then click open to pop up the earth map.

3. In the data source manager, go to Vector and set the source type as File, the source is
according to the database file location and click add.

33
4. The data which is earth map will be successfully updated in display of QGIS. Therefore,
student need to change the layer by using Layer Styling

5. To appear the Layer Styling, click View and select Panel. Then, tick on Layer Styling box

34
6. Click on Layer Styling to change the layer into ne_110m_admin_0_countries_lakes

7. Select natural_earth_vector - ne_110m_admin_0_countries_lakes

35
8. Click the colour bar to change the colour of RGB into 200, 200 and 100 respectively.
Then, click apply button on below

9. Select Simple Fill to change the colour of stroke line. The RGB colour was change into
255 respectively and click OK button

36
10. On the Layer section, right click on the natural earth vector – ne_110m_populated places
and click the properties on bottom of the list

11. Change Single Symbols to Graduated

37
12. Change the Value to 123 POP_MAX and method to size

13. Click the Classify button on below to see the result.

38
14. To ease the reader, student need to denote the class value in million by using Expression
Dialog. Therefore, student need to click on Epsilon and write “POP_MAX”/1000000 and
click OK

15. Next, click Classify button again and student will see the classes column was changes.

39
16. To changes the colour of the circle, click symbol and changes RGB colour to 131, 99 and
236 respectively.

17. On the Symbol Settings, reduce the Opacity to 50.0% and change the mode to Pretty
Breaks

40
18. Change the Precision to 0 and the size range was changed into 1 to 12 instead of 1 to 8.
Also, ensure tick on Trim box

19. Reduce the opacity of small circle into 50.0% by double click the small circle and symbol
selector will be appear. Then click Simple Marker to change the stroke style into No Pen

41
20. Next, student need to change the spatial reference system to ESPG : 4326 WGS 84. First,
student require to open properties of natural earth vector – ne_110m_populated places
and select CRS.

1.1 CHANGING THE PROJECTION

21. Then, search up the reference system and click on it. Hence, change the projection of the
map to World Robinson

42
This is the result after applying the projection to the map

43
PART 2 LABELLING

2.1 ADDING LABELS TO THE COUNTRIES


22. Student will see a few of the labels are not displayed with correct text glyphs. Therefore,
student requires to resolve this problem. On natural earth vector – ne_110m_populated
places layer, clicks properties and select control feature labelling. No label needs to changes
into Single Labels

23. Then, changes the font text to Georgia and the text size to 13.

44
24. The map displays too many labels. Hence, student need to make the map look better by
labelling the largest population centers only

25. To resolve this issue, click properties of metro population’s layer and select control feature
labelling. Then, chose Rendering and at Show Label select Edit

45
26. The expression string builder will pop up and type “POP_MAX” >= 10000000. The
expression button turns yellow to indicate that it is active and click apply

46
27. To make the map more interesting, move the label around a bit and create leader line
connecting to their point. Move the label by using Highlight Pinned Label, Diagram and
Callouts.

2.2 ADDING LEADER LINES


28. To bring up the leader line, select the properties of metro population layer’s and click
symbols

47
29. Click Simple Marker to change symbol layer type to Geometry Generator

48
30. Change a geometry type to LineString / MultiLineString. On the Geometry Generator and
write
make_line(
make_point(
“auxiliary_storage_labeling_positionx”,
“auxiliary_storage_labeling_positiony”),
$geometry
)

31. Then, the line string will appear on the symbols and click OK

49
32. Only a few of line string appear on map. Therefore student need to move the label of the
point to shew the line string

33. This map show all the line string appear after move the label of the point

50
PART 3 MAP DESIGN

34. To beautify the map, student can change the color of background and symbol according to
creativity. On the properties of the ne_110m_admin_0_countries_lakes, click color bar to
change the colour of background

51
35. Click metro population’s layer properties and change the colour of string and symbols

52
This is the results after beautify the map

3.1 CREATING A NEW PRINT LAYOUT


36. To bring After beautify the map, student need to print the layout to this recipe and name it
as popmap. To do this, click Project and select New Print Layout.

53
37. Then, the layout will be appeared and change the size to custom with width and height is
8.5 and 5.5 respectively

38. To add the map to the page, click on Add a new Map to the layout tool in the left-hand
toolbar and adjust the map extend accordingly

54
3.2 MODIFYING THE DEFAULT LEGEND
39. After being satisfied with the position of the map in the layout, add the legend to map to
ease the user. To input the legend, click add legend icon

40. The legend will be pop up on the map and student need to remove the line on the circle of
the legend to make it beautiful

55
41. Change the name of the legend and give the title to the map by write in Main Properties

42. Change the colour of layout to make the map more interesting for the user to read

56
RESULT:

This the results after beautifying the map.

57
LAB 3:
LAYER STYLING AND LABELLING

AIM:
The aim of Lab 3 is to create a road map. Based on the purpose of a map, students must balance
the highlighting major roads, fit road name labels and enable different information overlays on
top of the road map. Since road map it to show the existing road, then many types of road (more
detail) should be insert to the layer and perform data-defined labelling.

MANUAL:
PART 1 LAYER STYLING
1. Start the job by opening the QGIS software > layer tab > Add layer > choose Add vector
layer like shown below.

58
2. Open the data (seattle_osm) from the job file which can be found in the book’s geodata
directory.

3. After clicking at the Add button (after uploaded the seattle_osm), the interface like below
will pop out > click Add layers.

59
Figure below shows the result of the data after being uploaded.

4. Tick only the lines layer and multilinestrings to reduce the view of the other items or layer
shown in the interface.

60
5. Right-click the lines layer > Properties

6. Select the rule-based renderer in the symbology section.

61
7. This opens the rule / layer properties dialog where student may add rules, label, filter, and
symbol for the rule. To add a new rule, just click at the green plus button and apply. Double
click at the first rule to edit the rule.

8. Set the first rule as roads and click the epsilon logo to insert the expression. The first
expression would be “highway” IS NOT NULL > click apply > OK.

62
9. Also, make sure to untick the symbol checkbox because students want to further refine the
set of rules and assign a symbol to this first basic rule.

3.1 ADDING MORE DETAILED RULES

10. Now, it is time to add details or add rules for the base rule. Second rule to be inserted is the
river with the expression is “waterway” =‘river’ then click OK.

63
Figure below shows the result after roads and river rules have been added.

64
11. Under the roads rule, there will be other categories like motorway, trunk & primary and
minor road. Thus, select the rule we want to add categories and click at the Refine Selected
Rules > Add Categories to Rule.

3.1.1 MOTORWAY
12. Now, students may add rules under the road classification by clicking at the epsilon icon to
pop out the expression dialog. The motorway is the simplest rule because it only contains
line with the highway value ‘motorway’. The expression is: “highway” = ‘motorway’ then click
OK.

65
13. After the motorway and river rule has been applied, the result like symbol and colouring
will look like this.

66
3.1.2 TRUNK & PRIMARY

14. Second rule for roads class would be trunk & primary which contains either ‘trunk’,
‘primary’ or motorway link’.

The expression for primary and trunk is: “highway”IN (‘motorway_link’, ‘trunk’, ‘primary’)

67
15. Students may also change the symbol colour or to add / delete rule that under that base rule
> OK.

68
After the motorway, trunk and primary and river rule has been applied, the result like its symbol
and colouring will look like this which all the layers are on.

3.1.3 ROAD
16. Add other categories to the rules for road by clicking the Refine Selected Rules. The same
type of rule using the IN () statement is used for the third rule labeled road. To express the
coding, select the epsilon icon.

69
The expression for it is: “highway” IN (‘trunk_link’, ‘primary_link’, ‘secondary’,
‘secondary_link’, ‘road’, ‘tertiary’, ‘tertiary_link’)

17. Double click at selected rule (any rule) to edit the coloring, opacity, and width of the line.

70
71
3.1.4 MINOR ROAD
18. Next, add minor road to the rule. Click the Refine Selected Rules > Add Categories to Rule
> OK.

19. Click the epsilon icon and insert the expression as follows: “highway” NOT IN (‘motorway’,
‘motorway_link’, ‘trunk’, ‘primary’, ‘trunk_link’, ‘primary_link’, ‘secondary’, ‘secondary_link’,
‘road’, ‘tertiary’, ‘tertiary_link’). This last rule minor road contains all other roads by using
NOT IN () statement listing all the previously defined highway values.

72
20. Edit the rule by choosing any colour, opacity and width of line according to student’s
creativity.

73
3.1.5 2nd MINOR ROAD

74
3.1.6 ROAD BRIDGES

21. Students furthermore distinguish between bridges for the three most important classes.
Refine Selected to Rule > Add categories to Rule.

22. Click epsilon icon and insert following expression for bridge: “other_tags” LIKE ‘% “bridge”=>
“yes”%’ OR “other_tags” LIKE ‘% “bridge”=> “viaduct”%’

75
23. After that, label the rule as Bridge. Choose the colour for the bridge, opacity, and width of
line at the Edit rule section > OK >Apply.

76
3.1.7 ROAD BRIDGES 2

24. Under the road bridge rule, add another category of road bridge 2 to the rule. Insert its
expression as following in expression string builder:
“other_tags” LIKE ‘%”layer”=> “2”%’

77
3.1.8 ROAD BRIDGES 1

25. Add another category of road bridge 1 to the rule. Insert its expression as following in
expression string builder: “other_tags” NOT LIKE ‘%”layer”=> “2”%’

78
3.1.9 SCALE: MINOR ROAD 1

26. For minor road, it is necessary to insert its scale. For minimum scale, set it as 1:1000
meanwhile maximum scale was set as 1:1 > OK.

79
MINOR ROAD 2
27. For minor road 2, scaling is also important. For its minimum scale, set it as 1:125000
meanwhile maximum scale was set as 1:1000 > OK

3.1.10 RIVER 1
28. Continue inserting other expressions for other rules. Make a new rule which is River with
expression like: “waterway” = ‘river’

80
29. Then, add categories to the river rule and label it as river 1 with (no filter) expression. Also,
set the scale for river 1 as 1:125000 (minimum) and 1:1000 (maximum) > OK > apply.

81
82
3.1.11 RIVER 2

30. Repeat step 29th but change the label as river 2. The scaling used is 1:1000000 for minimum
and 1:125000 for maximum.

83
3.1.12 MOTORWAY BRIDGE

31. Under the roads rule > motorway rule, make a new rule which is motorway bridge. As
usual, insert the expression like following: “other_tags” LIKE’% “bridge”=> “yes”%’ OR
“other_tags” LIKE ‘% “bridge” => “viaduct”%’

Then, click ok > change the colouring > Apply.

84
3.1.13 MOTORWAY BRIDGE 2

32. After that, students have to make two other rule under motorway bridge which is motorway
ck bridge 1 and 2. Pop out the editing rule > label it as motorway bridge 2 > clik epsilon >
insert the expression: “other_tags” LIKE ‘% “layer” => “2”%’

MOTORWAY BRIDGE 1

33. For motorway bridge 1, pop out the editing rule > label it as motorway bridge 1 > clik
epsilon > insert the expression: “other_tags” NOT LIKE ‘% “layer” => “2”%’

85
3.1.14 MOTORWAY

34. Make another motorway rule under motorway. This time the expression would looks like:
ick OK.“other_tags” NOT LIKE ‘%”tunnel” => “yes”%’ > click OK.

86
3.1.15 MOTORWAY TUNNEL

35. Besides that, also add categories to roads rule which is motorway tunnel with expression:
“other_tags” LIKE ‘% “tunnel” => “yes”%’

87
88
3.1.16 TRUNK & PRIMARY BRIDGE

36. Same goes for trunk & primary. Insert a new category under this rule namely trunk &
primary bridge.

37. Go to the epsilon and insert the expression: “other_tags” LIKE ‘% “bridge” => “yes”%’ OR
“other_tags” LIKE ‘% “bridge” => “viaduct” %’

89
3.1.17 TRUNK & PRIMARY BRIDGE 2

38. Repeat step 36th by adding categories to trunk & primary bridge. First category would be
trunk & primary bridge 2. Write the expression through the epsilon > expression string
builder > “other_tags” LIKE ‘% “layer” => “2”%’

90
3.1.18 TRUNK & PRIMARY BRIDGE 1

39. Secondly is the trunk and primary bridge 1. Write the expression through the epsilon >
expression string builder > “other_tags” NOT LIKE ‘% “layer” => “2”%’

91
3.1.19 TRUNK & PRIMARY

40. Make a new category (trunk & primary) under Trunk & Primary base rule. These two
have the same label but different expressions.

41. Use the expression string builder to express following expressions: “other_tags” NOT LIKE ‘%
“tunnel” => “yes”%’

92
Figure below shows the final arrangement of the rules and its output of symbolization.

93
3.2 UNDERSTANDING ROAD SYMBOL

Students use cased line symbols consisting of two symbol layers to create the road symbols.
Cased line symbols can be created using at least two symbol layers. The lower layer is a wide
and dark line, while the second is slightly narrower and lighter.

42. To create this look, go to line layer properties and choose motorway rule.

94
43. Double-click at the motorway rule and this editing rule will pop out. Choose the colour and
set the stroke width & offset value like figure below. Stroke style can be solid line,
meanwhile join style should be round and flat cap style to make sure that the road features
look like a connected network.

44. After that, go the lines layer properties again to open the layer styling panel and select the
symbol levels.

95
45. Therefore, the layer styling panel will then be showing the symbol levels.

46. Next, insert all the values for layer 0 and layer 1 according to the example given.

96
47. The symbol and colouring can be changed at the editing rule > symbol section (/) >
Apply.

97
PART 2 LABELLING

3.2 LABELS FOR ROAD


48. For easier and comfortable viewing, go to view tab > panels > tick the layer styling.

49. Then, the layer styling panel will appear at the side of the interface. For starting of the
labelling, go to labels section and select single based.

98
50. Make sure that Merge Connected Line to avoid duplicate labels is enabled in the rendering
section.

51. For longer roads, it is nicer to repeat the label after a certain distance. In order to achieve
this, set the repeating value in repeating labels section (placement section) as 120
millimeters.

99
52. Besides that, students also need to activate Curved Placement with On line position.

53. The angle between curved characters have been set to 25.0 (inside) and 25.0 (outside).

100
54. Students can define the data-defined Priority in the Placement section to make sure that
more important roads are labeled first. To do this, go to placement > priority > epsilon icon.

55. Now, insert the new expression as:

CASE
WHEN “highway” IN (‘motorway’)
THEN 10
WHEN “highway” IN (‘motorway_link’, ‘trunk’, ‘primary’)
THEN 9
WHEN “highway” IN (‘trunk_link’, ‘primary_link’, ‘secondary’, ‘secondary_link’, ‘road’, ‘tertiary’,
‘tertiary_link’)
THEN 8
ELSE 5
END

101
3.4 FINE-TUNING AND ROAD REFERENCE CODES

56. Last for road label is to combine road names and road reference code. Another expression
is needed for this. Following is the expression for road reference code.

concat (name,’ ‘,
CASE
WHEN strpos (other_tags, ‘ “ref”’) > 0
THEN left (
right (other_tags,
length (other_tags) – strpos (other_tags, ‘ “ref”’ => “’) -7),
strpos (right (other_tags,
length (other_tags) – strpos (other_tags, ‘”ref” =>”’) -8),
‘“)
)
ELSE “ END
)

102
103
3.5 LABELS FOR AREAS

57. It is nice to also label some parts of the polygon. For this map, student want to label piers and
parks, therefore select the multipolygon layer > properties > Single labels.

58. Set the expression: name LIKE '%Pier%' or name LIKE '%Park%'

104
59. To fit the name labels inside the polygons, it is necessary to split long labels into multiples
lines. Insert the expression: wordwrap (“name”, 12). The colour and other editing can be
changed according to student’s creativity.

105
60. Also, at the formatting section, set the alignment to Center and click OK.

61. The placement has also been set to Horizontal. This allows the labelling algorithm to
compute the optimal location for the labels rather than sticking to polygon centroid.

106
62. Finally, in the Rendering section, set the Suppress Labelling of Features Smaller Than to
5mm to avoid labels for tiny areas.

For now, after all the editing and setting is made, the map looks like figure below.

107
3.6 FINISHING TOUCHES
63. Select the points layer > properties. Let the point layer be the current layer.

64. As usual, at the labels section apply Single labels.

108
65. Use the Placement section > Offset from point for its mode together with Central Quadrant.
This is to place the labels at the exact point positions.

109
66. After that, vary the font size based on the place type using expression:

CASE WHEN “place” IN (‘city’, ‘town’)


THEN 12
ELSE 8
END

67. In the placement section, set the priority to maximum value to ensure all possible labels are
added to the map. Then, click OK.

110
111
3.7 MAP DESIGN

68. Last but not least, this step is to print a layout or to prepare a pdf file for the map. Go to
the Project Tab > New Print Layout > Give a name to the file.

112
69. Select the Add Map icon to insert the map into the layout.

113
RESULT:
To conclude, this is our group final output showing the route map with different design and
colours.

114
LAB 4:

LAYER STYLING IN COLOUR AND SETTING

AIM:

The aim of Lab 4 is to familiarize student with the use of shapeburst technique in s retro-style
design. Using visual cues to highlight geographic boundaries on a map makes it easier for
readers to distinguish between the essential figure on the map and the less significant land.

MANUAL:

PART 1 LAYER STYLING

1. First thing first, open the QGIS software and go to layer tab. Click the “Add Layer” and
Add Vector Layer as shown below.

115
2. Choose the natural_earth_vector.gpkg database from geodata folder when the vector
dataset display appears. Then click open to pop up the earth map

3. In the data source manager, go to Vector and set the source type as File, the source is
according to the database file location and click add.

116
4. The data which is earth map will be successfully updated in display of QGIS. Therefore,
student need to change the layer by using Layer Styling

1.1 SCHOOL GLOBE STYLE WITH COUNTRY SHADING


5. To appear the Layer Styling, click View and select Panel. Then, tick on Layer Styling box

117
6. On Layer Styling section, change the layer into ne_10m_admin_0_countries

7. On Symbology section, change the top drop-down for the countries layer to Categorized

118
8. Then, select the column MAPCOLOR7 which mean it can render a maximum of 7 unique
colour

9. Click classify and the colour ramp will be appear

119
10. Hence, the map will be coloured by 7 random colour

11. To change the colour, right click on natural_earth_vector_ne_10m_admin_0_countries


and duplicate the layer

120
12. Move the duplicate layer on top and active it. For the other layer, right click and select
properties

13. On symbol, click the pink color and symbol setting will be pop up. Then, change the
symbol layer type into Shapeburst fill

121
14. On Shapeburst fill, click the Data defined override button next to it and select Edit

15. Hence, type the expression @symbol colour into Expression string builder and click OK

122
1.2 MAP LAYOUT
16. Select the points Set the second colour to transparent meanwhile the shading style could
set distance to 4 millimeters and the Blur strength to 10. Also, set the opacity for entire
layer to 70% in the Layer Rendering section

123
17. To darker the edges of each polygon, set the distance 5 and blur strength 4 according
satisfaction points on the map

18. Add a shadow and fill the colour inside in the country to beautify the country in the map
following creativity of student

124
19. This is final outcome according to imagination of student and suitability

125
20. After beautify the map, student need to print the layout to this recipe and name it as
popmap. To do this, click Project and select New Print Layout.

21. Then, the size will change into A4 and orientation into landscape according to the
suitability of the data.

126
22. Click Add a New Map to layout tools and student need to drag an area for the map
according to the input of data that shown in map

127
RESULT:

This is final output of the map according to student’s idea and creativity.

128
BONUS RECIPE

23. First thing first, open the QGIS software and go to layer tab. Click the “Add Layer” and
Add Vector Layer as shown below.

24. Choose the seattle_osm database from geodata folder when the vector dataset display
appears. OSM stands for Open Street Map.

129
25. In the data source manager, add the multipolygon layer to the project. Then, set the source
type as File, the source is according to the database file location and click add.

26. After that, students could see the data had been successfully uploaded.

130
27. Right click the seattle osm – multipolygons and click properties

28. Next, students must change the map’s coordinate reference system to EPSG:102348 in the
CRS section. Click Apply.

131
29. Open the properties of building polygon, rename the layer name to BUILDING and fill
Provider Filter Feature to “building” IS NOT NULL

30. Then, duplicate the layer of building polygon and change the layer name into WATER

132
31. Open properties of water layer and click Query Builder. Then, fill the expression to
“natural” = ‘water’ OR “other_tags” = ‘ “waterway” => “riverbank” ’

32. Change the colour of water to blue to make it looks like a water area

133
33. Center the map on an interesting portion of the Seattle area such as Lake Union area. To
zoom to the the area, click View, Show Bookmarks and using the Spatial Bookmarks panel
import tool, locate QMD Bookmarks in the resources folder for this book and zoo to the
Lake Union bookmark named Seattlearea

34. Duplicate water layer and rename it as vignette.

134
35. Open the properties of water layer, change the symbol layer type to Shapeburst Fill

36. Make the first shapeburst colour and the second white and set the shading distance to 15
millimeters

135
37. For vignette layer, use the pattern dot black symbol for the fill and a fairly thick black
outline. Therefore, student need to open the properties of vignette layer to do step below

38. Open layer properties of water and change the bleeding mode to dodge

136
39. The dot pattern on the map gradually faded after implementing dodge mode. Next,
duplicate the water layer

40. Rename it the duplicate layer as land and use an inverted polygon renderer for it.

137
41. Set it to simple fill style and return the blending mode to Normal

42. Then, change the fill colour by using code #faded2

138
43. Place the new land layer between the buildings and water layer

44. Zoom in to the chosen area and change the colour according to student creativity

139
PART 2 LABELLING

2.1 STYLING THE LABELS


45. To add label on the building, open the properties of building layer and click Edit a Label
Size by write

CASE WHEN strops ( "name" , 'Hall' ) >0


THEN 2
ELSE 7
END

140
46. Then, click the configure substitutes button at formatting tab

47. This will open the substitutions list as shown below

141
48. To add some extra space between the label lines, increase the Line height in the
Formating tab from default of 1.00 line to 1.20 line. Additionally, set the Allignment to
Center

49. Change the black label buffer to 1.5 millimeters wide and the opacity to 70%

142
50. The label placement Offset from centroid is combined with the central quadrant position
to make sure that labels are put directly on top of the center of the building polygon.
Then, click Edit to set the label size.

51. The priority of the label is lower for labels that contain the word “Hall”. Therefore,
student need to write
CASE WHEN strops ( " name " , ' Hall ' ) > 0
THEN 2
ELSE 7
END

143
52. Ensure the mode is Offset from centroid and set Suppress labeling of features smaller
than to 7 millimeters in the Rendering tab. This is because to avoid label s for very small
buildings.

53. The is the look of the map and student can change it depends the creativity

144
54. The water areas are labelled as well and make sure to enable Only draw labels which fit
completely within feature to avoid undesired labels from showing up

145
PART 3 PRINT MAP DESIGN

55. Now, students must create the layout for the map. Click at the Project and select New Print
Layout.

56. Click Add a New Map to layout tools and student need to drag an area for the map
according to the input of data that shown in map

146
57. This is a final map with the label

147
RESULT:

This is final output of the map according to student’s idea and creativity.

148
CONCLUSION

All the four lab modules with four different methods have been done successfully. The manual
for the exercises that students have created is useful for the students themselves as well as the
other users to understand the techniques of the QGIS software and may revise it thoroughly.
The four modules have taught the students how to insert data, create a map, style, and design
the vector map. At the end of each module, students have included the results which is the map.
The map will be evaluated through the overall appearance, map layout and its elements because
a good map is when the map is easy to understand even at a first glance, especially for the
people who are not expertise in cartography.

Last but not least, this QGIS module has taught the students a lot about this geospatial software,
and it makes the students explore all the tools and hidden patterns to create maps, visualize and
manage the data. QGIS software is suitable platform for beginner who works with geospatial
data where it offers basic operations and straightforward interface to let user produce a quality
map.

149

You might also like