0% found this document useful (0 votes)
9 views

Practice1 QGIS1 Visualization

Uploaded by

letruong0108
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Practice1 QGIS1 Visualization

Uploaded by

letruong0108
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Gorica Bratic

[email protected]

GEOlab – Politecnico di Milano 1


Content

• About QGIS
• QGIS introduction
• Data formats
• Managing data
• Layers properties
• Vector visualization
• Raster visualization
• Printing maps

2
-About QGIS-

3
QGIS Software

 QGIS (formerly Quantum GIS) was created in 2002 as a simple GIS viewer and has then evolved
into the leading Free and Open Source (Desktop) Software for Geospatial (FOSS4G) packages.
The latest release (July 2021) is 3.20.
 Long Term Release (LTR) is 3.16 (these slides refer to QGIS 3.16 'Hannover')
 QGIS is a project of the Open Source Geospatial Foundation (OSGeo)
• It runs on GNU/Linux, Unix, Mac OSX, MS Windows and Android
• It is licensed under the GNU General Public License (GPL)
• It supports vector, raster and database formats, including ESRI shapefiles
• Spatial data in PostgreSQL/PostGIS, GRASS vectors and rasters, or GeoTiff
• Maps can be compiled for printing using the print composer

 Users can add customized plugins and GIS-enabled applications using Python or C++.
 QGIS provides Server & Web Client capabilities to publish on the Web QGIS projects and layers
as OGC compatible WMS and WFS services.

https://www.qgis.org/en/docs
https://qgis.org/it/site/getinvolved/development/plugindevelopment.html
QGIS as a part of OSGeo
-QGIS introduction-

6
QGIS main graphical user interface

1. Bar Menu: main


features and
functions
2. Toolbar: common
features in a
single click
3. Layer panel: list
of the project
layers
4. Map panel:
geographic
display of active
layers
5. Status bar:
current
coordinates,
scale, rotation,
and coordinate
system

7
Display/hide panels and toolbars

Additional panels and


toolbars can be
activated or
deactivated from
1. View menu
2. Panels or
3. Toolbars
4. Alternatively, we
can right-click on an
empty space
(without icons) in
the Toolbars or
Menu bar section
and we will get a
full list of available
panels and toolbars.

8
Project properties

We can choose/modify QGIS


project properties. It can be
done from menu Project (1) →
Properties (2). Here we can
modify different points of
project properties such as
general project properties,
metadata, CRS, default style, etc.

Some important project


properties are:
• General → Measurements –
set ellipsoid and units for
distance and area
measurement
• CRS – check what is current
coordinate system or set
another one

9
QGIS settings

The appearance and functioning


of QGIS can be affected by the
settings of the software itself.
From menu Settings
(1) select Options (2) to
configure the ways to use QGIS.
For example, we can change the
general settings, or settings
related to the system, CRS, data
sources, etc.

One option that could be useful


is changing system locale on
General tab i.e., language and
numbers, date and currency
format.

10
-Data formats-

11
Data formats - Geopackage

● The GeoPackage is an open and platform-independent data format


standard promoted and adopted by the Open Geospatial
Consortium (OGC)
● GeoPackage is the SQLite container
● GeoPackage Encoding Standard manages the rules and requirements of
content stored in a GeoPackage container
● File extension name is .gpkg
● It is the default format for vector in QGIS
● In the GeoPackage we can store:
● vector features (point, lines, polygons)
● tile matrix sets of imagery and raster maps at various scales (Rasters are
stored in tile pyramids which represent group of downsampled rasters at
different zoom levels. Tile refers to individual raster. Tile matrix denotes rows
and columns of tiles that have same spatial extent and resolution. Tile matrix
set is definition of a tile pyramid tiling structure.
● attributes (non-spatial data)
● extensions (support use cases that are not part of the core standard)
Data formats – Geopackage content

● GeoPackage consists of number of tables that can be categorized as


● User-defined data tables
• Features - geometry column and a primary key are obligatory columns of
features table while remaining schema is up to the implementer
• Tiles – contain actual raster tiles
● Metadata tables
• gpkg_contents table is the table of contents for a GeoPackage Mandatory metadata
• gpkg_spatial_ref_sys is the table with the details about CRS tables
• Other (depending on the content stored)
• For features: gpkg_geometry_columns - describes the geometry
• For Tiles: gpkg_tile_matrix_set table (describes names a tile matrix set)
and gpkg_tile_matrix (identifies tile matrices by the zoom level in the tile
matrix set)
Data formats – shape file

Shapefile format stores non-topological geometry and


attributes of a spatial entity (point, line or surface) in a
single data set .

.dbf .prj .shp .xml


attributes projection geometry metadata

indexes of non-spatial fields spatial indexes


.ain, .aih .shx, .sbn, .sbx
Data formats – shape file

1.3.3. Shape file shp


Mandatory files
* .shp — shape format; the feature geometry itself
* .shx — shape index format; a positional index of the feature geometry to allow seeking forwards and
backwards quickly
* .dbf — attribute format; columnar attributes for each shape, in dBase III format.

Optional files
* .prj — projection format; the coordinate system and projection information, a plain text file describing the
projection using well-known text format
* .sbn & .sbx — a spatial index of the features
* .fbn & .fbx — a spatial index of the features for shapefiles that are read-only
* .ain & .aih — an attribute index of the active fields in a table or a theme's attribute table
* .ixs — a geocoding index for read-write shapefiles
* .mxs — a geocoding index for read-write shapefiles (ODB format)
* .atx — an attribute index for the .dbf file in the form of shapefile.columnname.atx (ArcGIS 8 and later)
* .shp.xml — metadata in XML format
Data formats - Geopackage

ShapeFile GeoPackage
Advantages: Advantages:

• Well established de facto standard • Open – you can customize it


• It’s iconic • OGC standard
• Broadly implemented - GDAL,
Disadvantages: QGIS, R, Python, Esri, …
• Proprietary (ESRI) • As fast as geodatabase, but
• Relatively slow lighter
• Single file
• Multifile (.shp, .dbf, .shx minimum) • Faster than shapefile
• Attribute field names limited to 10
characters Disadvantages:
• Does not support storing topologies
• Uses ESRI WKT • Relatively young (2014)
• File size restricted to 2 GB • Raster support relatively limited
• Contain only 1 geometry type per file
-Managing data-

17
Load data from GeoPackage

There are multiple ways to load


layers from GeoPackage, but
the most effective way is to
create a connection with
GeoPackage. To do so we first
need to activate the Browser
panel as shown in Slide 7.
Afterward, in
the Browser panel right-click
on GeoPackage (1) → New
Connection (2). Navigate to the
folder where GeoPackage (e.g.
GIS4Schools_GeoPackage.gpkg
) is saved and open it.

18
Content of GIS4Schools_GeoPackage.gpkg

•GIS4Schools_GeoPackage.gpkg, containing the following layers:


• Lakes: Vector layer that represents the main lakes in the area of interest
• Land_Cover: Raster layer that represents the land cover classes defined within Corine Land Cover
2018
• Municipalities_OSM: Vector layer that defines the municipalities' boundaries within the area of
interest
• Population: Table containing the number of inhabitants of the municipalities around the lakes
• River_network: Vector layer that represents the main river network within the area of interest
• Temperature_distribution: Raster layer that represents the temperature distribution of the lakes
• Temperature: Vector layer representing the temperature distribution of the lakes

19
Load data from GeoPackage

If we click on the arrow next to


the name of GeoPackage we
will visualize the list of all the
layers included in the
GeoPackage. By double-
clicking on the name of a layer
it will be loaded into QGIS and
it will be visible in the Layers
Panel. For the following
exercise, we
need Municipalities_OSM, River_
network,
and Temperature layers, so
double-click on each of them to
load them in QGIS.

20
Content of the Population_municipalities_on_lakes.shp:

•Population_municipalities_on_lakes.shp: Vector file that represents municipalities on lakes and their


population

21
Load vector files - shapefiles

Shape files and other types of vector


data can be loaded by navigating to
their location using Browser panel, but
there are also other ways. One way is
to click on Layers → Add Layer → Add
Vector Layer (1), navigate to the vector
folder (e.g.,
Population_municipalities_on_lakes.shp
) (2), click on Add (3) button to load it
to the QGIS and Close (4) to stop
adding layers.

Note: Shape file consists of multiple


files. In QGIS you should select the file
with extension .shp or alternatively .dbf
to load shape file in QGIS.

22
Load raster files – GeoTIF files

GeoTIF files and other types


of raster data can be loaded
by navigating to their location
using Browser panel, but there
are also other ways. One way
is to click on Layers → Add
Layer → Add Raster Layer (1),
navigate to the raster folder
(e.g., Land_cover.tif) (2), click
on Add (3) button to load it to
the QGIS and Close (4) to stop
adding raster layers.

23
Add a new layer to GeoPackage

To add a layer to GeoPackage right-


click on a layer to be added
(e.g. Population_municipalities_on_lakes)
to Geopackage then click on Export →
Save Feature As (1). Specify
Geopackage Format (2), then browse
an existing GeoPackage file
(e.g. GIS4Schools_GeoPackage.gpkg)
to which to add a new layer (3), and
specify the new Layer name (4)
(Population_municipalities_on_lakes). If
there is need, change the CRS (5) and
select only specific attributes that we
want to keep (6). Click on OK (7) to
save a layer in a specified GeoPackage.

24
Add a new layer to GeoPackage

If you Refresh (1) the Browser panel as


shown in the figure you will be able to
see the new layer in the list of layers
of GeoPackage (2), but also it will be
automatically loaded to QGIS (3).

25
Remove layer from QGIS

Since Population_municipalities_on_lakes l
ayer will not be used we will remove it
from QGIS, but also from GeoPackage.

To remove it from QGIS right-click on


the layer and select Remove Layer (1).
Confirm the removal action by clicking
on OK(2).
In the same way we can
remove Population_municipalities_on_lake
s shapefile, and Land_cover raster as
they will not be used later.

26
Remove layer from GeoPackage

To
remove Population_municipalities_on_la
kes from GeoPackage right-click on the
layer in the Browser panel
(e.g. Population_municipalities_on_lakes)
and select Delete Layer (2). Then
in Delete Layer window we confirm
that we want to delete a layer (3) and
to compact (4) GeoPackage database.

27
-Layers properties-

28
Access to layer properties

Different properties of a layer


can be accessed/set/changed
from the layer properties. It is
necessary to right-click on the
layer (1) and click on Properties
(2). An example of layer
properties are basic properties
that can be accessed from
the Information tab (3).
On the Information tab one can
get basic information about
raster/vector such as Coordinate
reference system (CRS), name,
path, format, type of geometry,
coordinates of the extent, units,
number of features etc.
There are many other properties
that will be explained afterwards.

29
-Vector visualization-

30
Vector examples

Vector styling will be shown on the example of vectors:


•Municipalities_OSM: vector of polygons representing municipalities. It has 3 attributes:
•fid – unique feature identifier (number)
•source – information about data provider
•name – names of the different municipalities represented by this vector
•River_network: vector of lines representing rivers. It has 3 attributes:
•fid – unique feature identifier (number)
•name – names of the different rivers
•source –information about data provider
•Temperature: vector of points representing lake temperature on a regular grid of points. It has 3
attributes:
•fid – unique feature identifier (number)
•value – the numerical value of the temperature in each point (number)

31
Optimal order of layers

Order of layers displayed in the


Map panel depend on the order
in the Layers panel – the layer
at the top of the Layers panel
will be displayed at the top of
other layers.
For maximum visibility of layers,
it is recommended to keep point
features at the top of the Layers
panel list, then line features, and
at the end to have polygons
features as this is the order the
layers are displayed in
the Map panel . We can easily
rearrange the order of layers by
selecting one of them and
dragging and dropping it to the
preferred position.

32
Access to visual properties of a layer

Vector style is actually visual


property of vector; therefore, we
access it as any other layer
property - right-click on the
layer (1) and click on Properties
(2). The tab for visual properties
is the Symbology tab (3).

33
Access to visual properties of a layer

Alternatively, it is possible to
activate Layer Styling Panel. It is
done from the View menu (1) →
Panels (2) by ticking the box next
to Layer Styling Panel (3).

34
Types of vector symbols

The first thing to be defined in the Symbology tab (1) when


styling is concerned is the symbol type. It is done from the
drop-down menu (2) Some types of symbols are common for
every type of feature - points, lines, and polygons, such as:
•Single Symbol – single symbology for all the features of the
vector
•Categorized – splits features into categories according to an
attribute
•Graduated – splits features into intervals according to a
numerical attribute
•Rule-based – splits features according to the specific rules
However, some types of feature have particular symbols
(e.g. Inverted Polygons and 2.5D for polygon features).

There are even predefined styles that can be selected (3).

35
Single symbol style

In this exercise, regarding the


polygons, we are going to set a
simple style on
Municipalities_OSM. We can set
a Single symbol (1) with dark
yellow color as fill and black dash-
line stroke. To do so select sub-
level of Fill (2), and then Simple fill
(3) for symbol type. Select dark
yellow for Fill color (4), black color
for Stroke color (5), and dash line
for Stroke style (6). Click
on OK or Apply to apply the
style (7).

36
Single symbol style

To be able to properly see the style


applied to the vector of polygons
deactivate other layers in
the Layers panel (1).

37
Categorized symbol style

Moving forward, we will set a style for


visualizing River_network which is a line
feature. As for the polygons, style is set
from the layer Properties on
the Symbology tab. In this case, we will see
how to group features into categories by
using Categorized symbol
types. Categorized (1) symbol type is used
when there is an attribute whose values
can be grouped/categorized. In the case
of River_network, there is the
attribute source which contains information
about the data provider.
Select source attribute for
the Value field (2) and select a Color ramp
(3) (e.g. Viridis) Finally, click on Classify
(4) to make the classification. Categories
will be previewed in the central part of the
window (5). Click on OK or Apply (6) for
changes to take place.

38
Categorized symbol style

Here we can see the effect of the


style applied to lines. Also, we can
see categories in the Layers panel
if we expand the layer tree.

39
Vector feature labels

Another important aspect of vector styling is


the possibility of adding labels to the
features. It is done from the
layer Properties on the tab Labels (1). There
are different methods for labeling (2). In this
exercise, we will focus on single labels. In
case of single labels there is one label for
each of the features. Labels can be stored as
an attribute in the attribute table, or they
can be defined through an expression. We
can display this attribute name as a label by
selecting this field for the Value field (3).
There are different options for formatting
and configuring interaction with labels. We
can modify them by selecting the
appropriate tab (4). In this example, we only
set the Buffer (6) to be drawn (7) because it
enhances label visibility. Other options were
kept as a default for this exercise, but feel
free to explore what options are there. In
the Text Sample (4) field we can see the
preview of the text formatting.
40
Vector feature labels

As a result, we have names of some


rivers displayed. We can see that labels
have a white buffer around letters.

41
Graduated symbol style

Finally, we are going to set a style for


the points layer Temperature. Since
there are many temperature records and
they are numerical values it is
convenient to split them into a certain
number of intervals. To do so, the first
thing is to set symbol type Graduated
(1) which allows making intervals out of
the full range of numerical records.
Afterward, we select the attribute which
contains numerical values (e.g. value) (2).
Select Color ramp according to the
preferences (3). In this
example RdYlBu color ramp is selected
(red to blue), so we will Invert Color
Ramp (4) to have typical temperature
representation – blue to red. Select the
mode Equal interval (5) to split values
into equal size classes. Then specify
number of Classes (6) (e.g. 5) and click
on Classify (7). The resulting intervals
will be displayed in the preview (8). Click
on OK or Apply (9).

42
Graduated symbol style

To better observe outcomes of


the Temperature styling, we will
zoom to the extent of
the Temperature layer by right-
clicking on the layer and
selecting Zoom to layer (1).

43
Saving style

Style can be saved from


the Symbology tab of the
layer Properties. Click
on Style menu (1) → Select Save style
(2). Select one of the three Save styles
(3) available:
•QGIS QML style file
•SLD style file
•Database (GeoPackage)

Let us first check options of


the Database (GeoPackage) (3) save
the style. Insert a Style name (4) and
click on OK (5). The style is
automatically saved in the
GeoPackage together with a layer and
it will be displayed next
time River_network is loaded.

44
Saving style

The other two Save style options - QML and SLD - create a separate style files (Fig. 1.8.5.2). QML (1) is
an XML format suited to store styles that QGIS can support. To save a style in this format it is necessary to
specify the File path and name (2). It is the only style that allows selecting specific Categories of style to be
saved (3). SLD (4) (Styled Layer Descriptor) is an XML schema for the styling map layers. It is not suited only
for QGIS, but also for other GIS softwares. To save style as SLD file, specify File path and name (5).

45
Loading style

In a similar manner to the style saving, an


already saved style can be loaded Style is
loaded from Style menu (1) on
a Symbology tab of layer Properties. To load
a style saved in a GeoPackage (or other
database formats) select Load style (2) →
From database (GeoPackage) (3). To load
a style from a QML or SLD file select Load
style (2) → from file (4). When the style is
loaded from GeoPackage we can select
some of the styles that were previously
saved for this specific layer (5) or some of
the previously saved styles of other layers
saved in the same GeoPackage (6).
Furthermore, we can select
style Categories to be loaded (7). To load
styles from file, specify the path to
the QML or SLD file (8). With QML file we
can also select which style Categories to
load (9).

46
Save QGIS project

Besides saving a style


independently, we can save a
QGIS project (Fig. 1.8.5.4) which
saves currently loaded layers,
their styles, map extents, and
settings. QGIS project can be
saved by selecting menu Project
(1) → Save (2). Similarly, we can
resume work on a saved project
by selecting Project (1) → Open
(3).

47
-Raster visualization-

48
Raster examples

Raster styling will be shown on the example of vectors:


•Land_cover: retrieved and adapted for the extent, from Copernicus Land Monitoring Service-Corine
Land Cover 2018 official website, it is a land cover map with 40 land cover classes (defined with
different values).
•Temperature_distribution: it reports water surface temperature for Como, Lugano and Maggiore lakes
on the 14th April 2020.

Add these layers as shown in Slide 13, and remove previous vector layers as shown in Slide 19.

49
Raster render types

Raster Symbology is accessed in the


same way as vector symbology (Slide
26). From Symbology tab(1) you can
select the Render Type
(2) (Multiband colour, paletted/unique
values, singleband gray, singleband
pseudocolor, hillshade) with its
settings (as it is here the color
gradient and contrast enhancement).
You can also eventually define
the Colour Rendering as well as
the Resampling options.

50
Singleband gray render type

Singleband gray is the default view of raster data


when they are loaded on QGIS. It represents
raster with color gradient that goes from black,
for lower values, to white, for higher ones. This
Render type is useful when showing quantitative
information, with a wide range of values to be
represented within the raster (e.g. heights in a
Digital Elevation Model (DEM), or, as in this case,
the values of the Temperature_distribution raster
layer).

Try to invert Temperature_distribution raster


Singleband gray Color gradient (2) and look at
changes. Also, try to enhance differences, within
the temperature values of the raster, by choosing
the most suitable Contrast Enhancement (3) as
well as by changing Min/Max Value Settings
(where Min/Max values are used to define the
extent to which the gradient is stretched and/or
clipped).

51
Singleband-Pseudocolor render type

In some cases, adding colors to the raster


can help in better understanding the
phenomena the raster describes. For the
rasters with wide range of values
Singleband pseudocolor render type can
serve to include colors into data
visualization.
As an example, let’s displaye 10 intervals
of the lake temperature in different colors.
Select Render Type: Singleband-
Pseudocolor (1), choose a
meaningful Color ramp (2) (here e.g. Reds),
select Mode: Equal Interval (3) and
insert 10 as number of Classes (4), click
on Classify (5) and the temperature values
will be divided in 10 equal intervals from
their minimum to their maximum. Click
on Apply and look at final layer
visualization.

52
Singleband-Pseudocolor render type

As a result, temperature of the lake


is represented by red colors now.
The lower temperature is
associated with lighter red, and
higher temperature is associated
with darker red color

53
Paletted/Unique rendering type

This Render Type is suitable


for representing categorical
rasters with a small range of
values. It represents each
different value within the
raster with a different color.
_style.
Select Render Type:
Paletted/unique values
(1) and leave Color
ramp to Random colors (2):
click on Classify (3) and then
on OK or Apply (4).

54
Paletted/Unique rendering type

Now you can see each land


cover class displayed with a
different color, linked to its
pixel value, from 0 to 41.

55
-Printing maps-

56
Rasters and vectors for map printing example

The following exercise will focus on creating an effective map layout, with the basic elements that a map should
contain as the legend, the title, the scalebar, etc.
The map to be composed, representing the water surface temperature distribution on Northern Italian insubric
lakes, will contain the following data:
•Raster data:
•Temperature_distribution
•Vector data:
•River_network
•Municipalities_OSM

These listed layers must be loaded and activated (ticked) in your Layers Panel. Add these layers as shown in Slide
13, and remove other layers as shown in Slide 19.
Be careful also to respect this order of listing to see Temperature_distribution layer on the top of the other ones.

57
Create New Print Layout

To create a map go to Project


menu → New Print Layout (1) or
press Ctrl+P on your keyboard. It
will open a tab where you can type
the title of the print layout you
want to create (2), then by clicking
on OK (3), a map layout project will
be opened: you can simply work
there to compose your map with
all the needed items.

58
Compose a map – Add a map

There are different options that can


be used to add the different basic
map elements: the map itself, the
legend, the map title, the north arrow
and the scalebar.
Click on the Add Map icon (2) and
then click on the position on the
blank page where you want your map
to be attached: by simply
clicking OK for the New item
Properties, in your page it will appear
what it is shown in your QGIS Map
panel. Check if the map content is
adequately centered or zoomed, if
not you can adjust them back in QGIS
Map panel and they will be
automatically updated in your Print
Layout. In the New Print Layout
window you can use also
the Select/Move item (1) icon to
move or resize the Map (or also the
other map elements).

59
Compose a map – Add a title

Title is very important to understand


at first sight what a map represents, it
should summarize with a few words
map purpose, place and time. To add
the title to the map click on Add
label button (3), decide the position
where to place it and click OK to
confirm its properties. Title position
usually should be located on the top
of the page, with a larger font with
respect to other map items. After
having selected the Title item in
the Items Panel (7) on the right, Insert
the title text (e.g. here it could be
“Water Surface Temperature
Distribution in the insubric lakes on
14/04/2020”) and set its font in
the Item Properties Panel (8).

60
Compose a map – Add a legend

Click on Add legend button (4),


decide its position and accept the
default item properties. You will
visualize the legend on your map. It is
possible to edit the legend, after it
has been created, by going on
its Item Properties (8), just check,
before, to have the Legend item
selected in the Items Panel (7).

61
Compose a map – Add a legend

In the Item Properties box, you can name the item (1). Then you can focus on legend items:
when you add a legend to the map, its different items are represented by default, in the same
way they are represented in your QGIS Layers Panel. Therefore, before printing the map, it is
usual to change some names, labels or order to make them more understandable. Here, there
are two ways: one can make edits directly from QGIS Layer Panels, by modifying the style of
layers, or one can also choose to modify them just on the Map Print Layout, leaving the
Layers style as it is on QGIS. To apply the second option, it is necessary to uncheck the Auto
update box (2) into the Item Properties Panel. In the Legend items box now it is possible to:
• Reposition the single layers into the Legend, by clicking on the two arrows (3) below the
box.
• Add or remove layers, that are not visible on the map, from the legend (by clicking on + or
– (4)
• Change one layer’s name, by double-clicking on the layer’s name, typing a new name and
clicking on OK. Here, for example, try to change Temperature_distribution into a clearer
‘Water Temperature Distribution’ (5) as well as Municipalities_OSM into ‘Municipalities
borders’.
• Change the number of decimal digits of temperature values. To do so, click on each
numerical label (6) in the Legend items box and then remove the unnecessary digits,
clicking then on OK.
Finally, from Fonts and Text Formatting box (7), try to change also the font used for the
different items in the legend: remember it should be visible but not too huge.

62
Compose a map – Add a scalebar

The map scale allows a map user to


properly understand the objects sizes
and the distances on the map. To add a
scalebar click on Add Scalebar (Fig.
1.10.2, (5)), click on the position where
to place it and click OK. Under the
Item properties you can
change Style or Scale bar units, Label
for units, etc. Try to style your scalebar
in a way it can be clearly legible as well
as useful, by choosing the adequate
size and unit of measure. It is possible
to replace scalebar by lexical scale (eg.
1:60000) by changing
scalebar Style to Numeric. However,
use of lexical scale should be limited to
those cases where the map is to be
printed on paper, otherwise, on a
digital document, the scalebar is more
appropriate.

63
Compose a map – North arrow

Another basic element in a map is the


North arrow that helps the viewer with
orientation. It can be added on map by
clicking on the Add North arrow icon
(6), clicking on the position where to
place it, and clicking on OK then.

64
Compose a map – Save map

Try to create a well-balanced map,


clear and effective and try to size and
locate each element according to its
importance. When in the end you are
satisfied with the map layout, you can
export it as PDF, image or SVG File. In
every case, just click on one of
the Export as… buttons (9), choose the
folder where you want to save the
map, name it, or just leave the one you
gave at the beginning (‘Distribution of
temperatures in insubric lakes’). Click on
Save to open the Export
Options window where it will be
possible to define Export resolution,
Page width or height and also to Crop
page to content if some parts of it are
empty (5). You can keep all the default
settings and click on Save: the map will
be finally complete and saved on your
PC.

65
Compose a map – Save map

The figure is showing an example of


the possible final print layout

66
Exercise

• Create map layout with all elements (map name, legend, north arrow, scale bar) for the following layers:
• Display raster of temperature (Temperature distribution) so that it has 10 classes formed with quantile mode. Use Inferno
color ramp.
• Display every river (River network) that comes from different source with different color
• Display municipalities (Municipalities_OSM) in green fill with light green outline
• Assign lables to municipalities. The label should be a name of the municipality
• Create map layout with all elements (map name, legend, north arrow, scale bar) for the following layers:
• Display lake temperature (Temperature) with 20 equal interval classes and BuRd color ramp. (Hint → BuRd color ramp is
not available. Select RdBu and invert it from color ramp drop-down menu)
• Display land cover (Land cover) so that each value of a raster has different color. Use random color ramp.

67
Exercise - result

Hints for legend: Edit manually River_network


labels. Set both legends to have 2 columns.

68
This presentation contains partially adapted content of GIS4Schools created by M. A. Brovelli, D. Carrion, M.
Gianinetto, D. Oxoli, L. G. A. Biagi, C. A. Biraghi, , G. Bratic, C. Gerosa, F. N. Polinelli, J. F. Toro Herrera, A.
Vavassori, L. Amici(© Copyright 2021, GEOLab). It is licensed under CC BY-NC-SA 3.0.

Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)


Under the following terms:
You are free to: •Attribution — You must give appropriate credit, provide a link to the
•Share — copy and license, and indicate if changes were made. You may do so in any
redistribute the material in reasonable manner, but not in any way that suggests the licensor
any medium or format endorses you or your use.
•Adapt — remix, transform, •NonCommercial — You may not use the material for commercial
and build upon the material purposes.
•The licensor cannot revoke •ShareAlike — If you remix, transform, or build upon the material, you
these freedoms as long as must distribute your contributions under the same license as the original.
you follow the license terms. •No additional restrictions — You may not apply legal terms
or technological measures that legally restrict others from doing anything
the license permits.
69
Gorica Bratic
[email protected]

GEOlab – Politecnico di Milano 70

You might also like