From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Β
QGIS Tutorial by Indo-RNO v1.0.pdf
1. βWhen a man dies, his acts come to an end, but three, recurring charity, or knowledge (by which people) benefit, or a pious son, who prays for him (for the deceased).β
-Sahih Muslim 1631-
QGIS Basic Tutorial
By Pusat Loker RNO Only
a.k.a. Indo-RNO
3. Table of Content
1. Installation
a. Program
b. Plugin
c. Material
2. Basic Principle
a. File Type
b. CRS
3. Frequently Used Symbols
4. Display Basic Accessories on Canvas
a. Scale
b. Image
c. Compass
d. Title
e. Copyright
f. Annotations
g. Google Map
5. Open File
a. Vector: TAB/MIF/SHP
b. Raster: Google Map/Earth, Elevation
c. Text: CSV
d. Excel: XLSX
6. Download Raster for Offline Use
a. DEM/Contour/Elevation
b. Google Map
7. Searching and Finding
a. Search Location by Long Lat
b. Copy Long Lat of Location
c. Search Value on Layer
8. Thematic Layer
a. Add Color on Layer
b. Add Color on Raster
c. Add Label
9. Export Layer to KML/KMZ
10.Contour/Elevation Check
11.Selection and Query
a. Manual Select on Canvas
b. Filter Expression by Script
c. Select Data by Polygon
12.Edit Layer
a. Change Value of Column
b. Change Table Structure
c. Split Polygon
13.Clipping by Polygon
a. Vector
b. Raster
14.Create Shape
a. Border Polygon
b. Route Line
c. Buffer
d. POI Based on Long Lat
e. Gcell
15.Append / Merge
a. Join Layers by Same Column
b. Join Attributes Data inside Polygon
16.Join Layer
a. Join Layers by Same Column
b. Join Attributes Data inside Polygon
17.Heatmap
a. Basic Heatmap
b. IDW Interpolation
c. Linear Interpolation
18.MR/Covmo 40x40 meter
a. Change Scale MR for Display Only
b. Create MR Square/Grid Shape
Permanently
19.Map Reporting
20.Network Audit
a. Inter Site Distance (ISD)
b. Nearest Site to Polygon
c. LAC Island//Mushroom with Voronoi
5. Installation
1. Download and Install QGIS: https://qgis.org/en/site/forusers/download.html
2. Open QGIS and go to Plugins β Manage and Install Plugins β Search and install the following plugins:
a. Search Layers
b. Profile Tool
c. SRTM Downloader
d. Spreadsheet layers
e. Shape Tools (in Vector)
f. Lon Lat Tools
g. KML Tools
h. QCopyCanvas
i. QuickMapServices
3. Download Link for Materials:
https://1drv.ms/f/s!Ari-fJDiX6PzjdtKV9ZkIINu5nvV7A?e=bNntEL
4. Download Link for Tutorial Update:
https://1drv.ms/f/s!Ari-fJDiX6PzjdtL-daJdbcyuASF_w?e=eWfFts
6. Basic Principle
File
Type
Vector
Vector data is used to
represent real world features
in a GIS.
Ex: .TAB, .MIF, .SHP
Raster
Raster data are a grid of
regularly sized pixels.
Ex: Google Map/Earth, DEM
(Contour), .TIF
Text
A delimited text file is an
attribute table with each
column separated by a
defined character and each
row separated by a line break
Ex: .CSV, .TXT
Excel
A spreadsheet consists of a
table of cells arranged into
rows and columns and
referred to by the X and Y
locations.
Ex: .XLS, .XLSX
Ctrl + Shift + V
Ctrl + Shift + R
Ctrl + Shift + T
No Shortcut
CRS Type
EPSG:4326 - WGS 84
Unit: Degree
EPSG:3857 - WGS 84 /
Pseudo-Mercator
Unit: Meters
A coordinate reference system (CRS) then
defines, with the help of coordinates, how the
two-dimensional, projected map in your GIS is
related to real places on the earth. The decision
as to which map projection and coordinate
reference system to use, depends on the
regional extent of the area you want to work in,
on the analysis you want to do and often on
the availability of data.
7. Frequently Used Symbols
Move Canvas
Zoom In See Info of Feature
Measure Line Distance
Add Annotation Text to Canvas
Add Polygon/Line
Move Label
Deselect Features
Select Features by Polygon
Shape Tools
Zoom to Long Lat
Export to KMZ
Screenshot Canvas
Create New Shapefile Edit Layer Contour Check
Search Layers
Download Online Contour
Select Features
8. Display Basic Accessories on Canvas
1. Go to View β Decorations β Select the following
setting
a. Scale Bar
b. Image
c. North Arrow
d. Title Label
e. Copyright
2. Go to Edit β Annotation β Text Annotation β
Click on Canvas β Double click on box created β
Setting Opacity to 0% on both Linked layer and
Map marker
*Tips: always use buffer for text labelling
Enter Image file path
10. Open File
1. Vector: TAB, MIF, SHP
a. Ctrl + Shift + V or Go to Layer β Add Layer β Add Vector Layer
b. On Source select file-> Add
2. Raster: Google Map/Earth, DEM/Elevation, TIF
a. Ctrl + Shift + R or Go to Layer β Add Layer β Add Raster Layer
b. On Source select file-> Add
3. Text: CSV, TXT
a. Ctrl + Shift + T or Go to Layer β Add Layer β Add Delimited Text Layer
b. On File Name select fileβ On X field and Y field select Long and Lat of the
File β Add
4. Excel: XLSX, XLS
a. Go to Layer β Add Layer β Add Spreadsheet Layer
b. On File Name select fileβ On Sheet select data sheet of File
c. Checklist Geometry β On X field and Y field select Long and Lat of the
File β OK
*The Layer will be opened on Layer Panel on the left bar
11. Download Raster for Offline Use
1. DEM / Contour / Elevation
a. Indonesia local DEM all province:
https://www.indonesia-
geospasial.com/2020/01/download-dem-srtm-30-meter-se-
indonesia.html
b. Custom area by Canvas
Go to Plugin β SRTM Downloader β Canvas Extent ->
Download β Enter Username and Password (register free
on link) β OK
2. Google Map: Select only Google Map on Layers panel
a. Current Display (No zoom)
Go to Project β Import/Export β Export Image to Map β
Map Canvas Extent -> Save
b. Current Display in Detail (Zoom in)
β Double click Google Map Layers panel β Export β
Save As
β Select File Name β Map Canvas Extent β Fill β1β on
both Horizontal and Vertical -> OK
12. Searching and Finding
1. Search Location by Long Lat
a. Search Location on https://maps.google.com/
β Right click and select Lat Long
b. Go to Plugins β Lat Lon Tools β Zoom to
Coordinate β Paste Lat Long Value β Enter
c. Click to setting marker
2. Copy Long Lat of Location on Canvas
a. Right click anywhere to canvas β Copy
Coordinate β Map CRS
b. Paste to Notepad/Excel
3. Search Value on Layer
a. Go to Plugins β Search Layers β Search
Layers
b. Write value to search β Select Layers β
Search Fields β Select βZoom to selected
featuresβ β Click Search
c. Click one of the result
13. Thematic Layer
1. Add Color on Layer
a. Double click on layer β Symbology β There are 3 symbol often used:
β Single Symbol: for a single symbol with no criteria of value
β Categorized: for String/Text type of value β Go to Value to select
column of layer to be colored β Classify
β Graduated: for Decimal type of value
b. These are features often used:
β Fill Color β Color inside polygon
β Fill style β Fill type inside polygon
β Stroke color β Color of line/border
β Stroke style β Color
β Opacity β Transparency
β Style β Save and Load style as template
β Value β Column name of layer as reference
β Color ramp β Spectrum of color
β Classify β Automatic color adjustment
β Classes β Number of value range
* Double click on Symbol/Value edit manually
14. Thematic Layer
c. Add Color Ramp
β Back to Canvas β Go to Settings β Style Manager β
β Color Ramp β Click + β Select Catalog: cpt-city
β Select any color β OK
β Type name of Color β Tick Add to favorites β Save
15. Thematic Layer
2. Add Color on Raster
a. Double click on layer β Symbology β On Render Type select Singleband pseudocolor β Select Color ramp β Classify β OK
b. To change Opacity go to Transparency β Set Global Opacity value β OK
* Double click on Value/Color/Label to edit manually
* Click on + to add more range of value
16. Thematic Layer
3. Add label
a. Double click on layer β Labels β There are 3 symbol often used:
β Text: change font, style, size, color
β Buffer: add buffer background of label
β Callouts: add line of label β On Toolbar click symbol to move label
17. Export GCELL Layer to KML/KMZ
1. Go to Vector β KML Tools β Export KMZ
2. Setting as the following:
a. Input Layer: a layer to be exported. Ex: Gcell
b. Name/Label field: a field/column to be labelled on KMZ file. Ex: Sitename
c. Checklist Export style for single, categorized, and graduated symbols
d. Output KMZ file β Save to a File: Output file path
3. Click Run
4. After finished .KMZ file can be opened on Google Earth
KMZ file opened in Google Earth
18. Contour/Elevation Check
1. Go to Plugins β Profile Tool β Terrain profile
2. Select DEM layer
3. Click Add Layer
4. Click on Canvas to stretch from one point to another point, double click to finish
5. Right click to close measurement
6. Click Save As to save as image file
19. Selection and Query
1. Manual Select on Canvas
a. Go to Select Features icon β Select any β Click any object/feature on
Canvas
b. To use multiple selections use Ctrl + Click any object/feature on
Canvas
2. Filter Expression by Script
a. Right click on layer β Filter
b. Select Fields to search β All
c. Use Expression with base βFieldβ operator βValueβ
d. Herewith frequent expression to use:
β Select one value:
βFieldβ = βValueβ
β Select multiple value:
βFieldβ = βValueβ OR βFieldβ = βValueβ
β Select value contain string:
βFieldβ LIKE β%Value%β
Use to deselect/unselect features click on
* Features/Object selected will be colored in Yellow
* Features/Object filtered by multiple value
20. Selection and Query
3. Select Data by Polygon
a. Go to Vector β Research Tools β Select by Location
b. Select features from layer to be selected β tick are within β By
comparing to the features from select polygon layer to be
mask/border β Run
* Ex: Select feature from (MR), By comparing to the features from (Polygon Kota
Pekanbaru) β Result: All MR inside polygon Kota Pekanbaru are selected
Before
After
* Features/Object selected will be colored in Yellow
21. Edit Layer
Right click on layer β Toggle Editing
1. Change Value of Column
There are 2 way to edit layer:
a. Right click on layer β Open Attribute Table β Edit any cell value to change.
To filter a value click on bottom left β Field Filter β Select column name β Type value to search β Enter
b. Identify feature on one of the object canvas β Click β Edit any value to change
c. Right click on layer β Save Layer Edits
22. Edit Layer
2. Change Table Structure
a. Go to Processing β Toolbox β Search Refactor fields
b. Select both Input Layer and Load fields from template layer
from same layer
c. Edit any fields such as: Name, Type, add fields, delete fields,
move field up and down
d. Run
23. Edit Layer
3. Split Polygon
a. Right click on Polygon layer β Toggle Editing
b. Go to Edit β Split Features
c. Click on Canvas to create line to split Polygon. Right click to finish.
d. Change value on new polygon
e. Right click on layer β Save Layer Edits
Before Cutting After
24. Clipping by Polygon
1. Vector
a. Go to Vector β Geoprocessing Tools β Clip
b. On Input Layers select vector layer to be clipped
c. On Overlay Layer β select polygon as border to clip
d. Run
* Ex: Input (Gcell), Overlay (Polygon Kota Pekanbaru) β Result: Gcell inside
Polygon Kota Pekanbaru
2. Raster
a. Go to Raster β Extraction β Clip Raster by Mask Layer
b. On Input Layers select raster layer to be clipped
c. On Mask Layer β select polygon as border to clip
d. Run
* Ex: Input (.tif of Google Map), Mask (Polygon Kota Pekanbaru) β Result: .tif of
Google Map inside Polygon Kota Pekanbaru
* To reduce file size convert to .PNG go to β Raster β Conversion β Translate
β Select clipped (mask) on Input Layer β on Converted select Save to File β
Run
25. Clipping by Polygon - Result
Vector β Gcell inside Kota Pekanbaru only Raster β .TIF of Google Map inside Kota Pekanbaru Only
26. Create Shape
1. Border Polygon
a. Go to Layer β Create Layer β New Shapefile Layer
b. Select File name β Geometry type β Polygon β
Change CRS to EPSG:3857 β Select Name, Type, Length
(if need to add new column/field) β Add to Fields List
β OK
c. Right click on new shapefile layer β Toggle Editing
d. Go to Edit to add shape. There are several menu to add
shape:
β Freestyle: Add polygon feature
β Circle: Add Circle β Add Circle by a Center Point
and Another Point
β Square: Add Rectangle β Add Rectangle from
Extent
e. Click on Canvas to draw Polygon β Right Click to Finish
β Add Value
2. Route Line
a. Go to Layer β Create Layer β New Shapefile Layer
b. Select File name β Geometry type β Line β Change
CRS to EPSG:3857 β Select Name, Type, Length (if
need to add new column/field) β Add to Fields List β
OK
c. Right click on new shapefile layer β Toggle Editing
d. Go to Edit β Add Line Feature
e. Click on Canvas to draw Line β Right Click to Finish β
Add Value
* Do thematic layer to change color and shape line
28. Create Shape
3. Buffer
a. Open/Add Polygon/Line to Layer Panel. Make sure the CRS type is EPSG:3857 - WGS 84 / Pseudo-
Mercator
b. Go to Vector β Geoprocessing Tools β Buffer
c. On Input Layer select Polygon/Line β Custom Distance and its unit (meters/kilometers) β On Join
style select Miter β Run
29. Create Shape
4. POI Based on Long Lat
a. Prepare CSV/Excel file of POI which consist of Long Lat
b. Add CSV/Excel file of POI to Layer Panel
c. Go to Vector β Shape Tools β Create shapes β Create circle
d. Use the following setting:
β Input layer: POI layer
β Shape type: Polygon
β Circle radius: POI distance from center to border
β Radius units: Kilometers/Meters
e. Run
Result
30. Create Shape
5. Gcell
a. Prepare CSV/Excel file of Gcell which contain at least the following column
β Sitename
β Cellname
β Band: Network system define shape size. Ex: L900, L1800, L2100, Indoor
β Long Lat: Coordinate of location
β Azimuth: Direction of antenna
β Azimuth Width: Horizontal size
β Radius: Vertical size
Herewith recommendation value of Azimuth Width and Radius:
Sorting Radius column from Largest to Smallest
b. Add CSV/Excel file of Gcell to Layer Panel
c. Go to Vector β Shape Tools β Create shapes β Create pie wedge
d. Use the following setting:
β Input layer: Gcell layer
β Shape type: Polygon
β Azimuth mode: Use center azimuth and azimuth width
β Beginning azimuth: Azimuth of Gcell
β Ending azimuth: Azimuth width of Gcell
β Radius: Radius of Gcell
β Radius units: Meters
e. Run
Band Azimuth Width Radius
L900 15 100
L2100 45 65
L1800 70 50
INDOOR 359.999 20
Result
31. Append / Merge
1. Merge Vectors
a. Go to Vector β Data Management Tools β Merge Vector
Layers
b. On Input Layers select vector layers to be merged
c. Run
2. Merge Rasters
a. Go to Raster β Miscellaneous β Merge
b. On Input Layers select vector layers to be merged
c. On Advanced Parameters replace No Data to 0
d. Run
33. Join Layer
1. Join Layers by Same Column
a. Prepare 2 layer: Base layer and Additional layer. Both layer must have one same column name
b. Add both layer on Layer Panel
c. Right click on Base layer β Joins β Click +
d. Use the following setting:
β Join layer: Additional layer
β Join field: field of Additional layer to join
β Target field: field of Base layer to be joined
β Joined fields: Select column of Additional layer to be added
e. OK
* Ex: Base layer (Gcell), Additional layer (PRB data) β Result: Gcell with have new column of PRB Util
Before
After
34. Join Layer
2. Join Attributes Data inside Polygon
a. Go to Vector β Data Management Tools β Join Attributes by
Location
b. Use the following setting:
β Base Layer: Additional layer
β Join Layer: Polygon of Border
β Geometric predicate: within
β Discard records which could not be joined: Ticked
c. Run
* Ex: Base layer (Gcell), Join Layer (POI) β Result: Gcell inside POI with all
column combined
Gcell with 38 fields (0-37) POI with 13 fields (0-12)
Joined Layer with 51 fields (0-50)
35. Heatmap
Prepare CSV/Excel of PRB/Payload in sector level using Bear Distance.xlsx calculator, then add to
Layer Panel based on Long Lat Azimuth/Sector
1. Basic Heatmap
a. Double click layer β Symbology β Change to Heatmap
b. Use the following setting:
β Color ramp: Pick any
β Radius: 10 millimeters
β Weight points by: Value of color
β Opacity: 25%
c. OK
Result
Long Site Lat Site Azimuth Distance (Km) Bearing2 Long Azimuth Lat Azimuth
101.4025 0.461111 0 0.1 0 101.4025 0.46200932
101.4025 0.461111 120 0.1 2.094395102 101.4032807 0.46066184
101.4025 0.461111 240 0.1 4.188790205 101.4017193 0.46066184
101.367777 0.484722 0 0.1 0 101.367777 0.48562032
36. Heatmap
2. IDW Interpolation
a. Re-Open layer by Export and Change CRS to EPSG:3857 - WGS 84 / Pseudo-Mercator
b. Go to Processing β Toolbox β Grid (IDW with nearest neighbor searching)
c. Use the following setting:
β Point layer: Main data
β The radius of the search circle: 600
β Z value from field: Value of color
β Additional command-line parameters: -outsize 10000 10000
d. Run
e. Thematic by Graduated symbol
Result
37. Heatmap
3. Linear Interpolation
a. Re-Open layer by Export and Change CRS to EPSG:3857 - WGS 84 / Pseudo-Mercator
b. Go to Processing β Toolbox β Grid (Linear)
c. Use the following setting:
β Point layer: Main data
β Search distance: 600
β Z value from field: Value of color
β Additional command-line parameters: -outsize 10000 10000
d. Run
e. Thematic by Graduated symbol
Result
38. MR/Covmo 40x40 meter
1. Change Scale MR for Display Only
a. Prepare CSV/Excel of MR data β Add
to Layer Panel
b. Double click on MR layer β Symbology
β Graduated
c. Go to Symbol β Simple Marker
d. Use the following setting:
β Size: 40, Meters at scale
β Stroke style: No Pen
β Symbol (Bottom): Square
β Color ramp: BGYR (Invert Color
Ramp)
β Classes: 4
β Value: Blue (-92 to 0), Green (-102
to -92), Yellow (-110 to -102), Red
(-140 to -110)
d. OK
Resul
t
39. MR/Covmo 40x40 meter
2. Create MR Square/Grid Shape Permanently
a. Prepare CSV/Excel of MR data β Add to Layer Panel
b. Go to Vector β Shape Tools β Create shapes β Create polygon
c. Use the following setting:
β Input layer: MR data
β Shape type: Polygon
β Number of sides: 4
β Starting angle: 45
β Radius: 28.284271
d. Run
e. Double click on Output layer β Symbology β Graduated
f. Use the following setting:
β Stroke style: No Pen
β Color ramp: BGYR (Invert Color Ramp)
β Classes: 4
β Value: Blue (-92 to 0), Green (-102 to -92), Yellow (-110 to -102),
Red (-140 to -110)
g. OK
41. Angle and Radius
0o
45o
* Angle is a degree from center point to elbow
a
b
c
π2
+ π2
= π2
π = π2 + π2
π ππππ’π =
π
2
* Radius is a distance from center point to elbow
Angle
β’ Use the Pythagorean
theorem to calculate radius
on Pythagorean
theorem.xlsx
42. Map Reporting
1. Go to Project β New Print Layout β Enter
title β OK
2. Herewith frequent items to put on report:
a. Add Map: Current canvas
b. Add Picture: Select file image
c. Add Label: Custom text annotations
d. Add Legend: Current layer on Layer Panel
e. Add Scale Bar: Scale distance of map
f. Add North Arrow: Compass
3. Go to Layout β Export as Image β Save
Map
Add Picture
Add Label
Add Legend
Add Scale
Bar
Add North
Arrow
Label
Legend
North Arrow
Picture
Add Map
Scale Bar
43. Network Audit
1. Inter-Site Distance (ISD)
a. Add Gsite to Layer Panel
b. Go to Vector -> Analysis Tools -> Distance Matrix
c. Use the following setting:
β Input points layer: Gsite
β Input unique ID field: Sitename
β Target points layer: Gsite
β Targget unique ID field: Sitename
β Use only the nearest (k) target points: Number of neighbor site to measure
d. Run
e. On output layer add Kecamatan field from Gsite by Join Layer β Export to XLSX
f. Pivot Table result by Kecamatan and sorting from Smallest to Largest
Result: LIMAPULUH is the Kecamatan which have the densest site population according
to smallest ISD
It is also can be used to define 1st tier sites of every site
Kecamatan Count of InputID Average of Distance
LIMAPULUH 30 951
PEKANBARU KOTA 10 966
SENAPELAN 10 1,108
SAIL 10 1,182
SUKAJADI 15 1,270
MARPOYAN DAMAI 80 1,524
BUKIT RAYA 45 1,773
PAYUNG SEKAKI 40 1,878
RUMBAI 160 2,319
TENAYAN RAYA 80 2,393
RUMBAI PESISIR 35 3,350
Result
44. Network Audit
2. Nearest Site to Polygon
a. Add Gsite to Layer Panel
b. Go to Processing -> Toolbox -> Distance to nearest hub (line to hub)
c. Use the following setting:
β Source points layer: Polygon Kecamatan
β Destination hubs layer: Gsite
β Hub layer name attributes: Unique field
β Measurement unit: Meters
d. Run
e. On output layer β Export to XLSX
* Result: Information of Kecamatan with its nearest site distance
Result
KECAMATAN HubName -> Sitename HubDist -> Distance Kecamatan to Site (m)
RUMBAI LINGKAR_BARAT_UNRI_CR 792.8908649
PAYUNG SEKAKI DHARMA_BAKTI_PBR_IB 1154.987623
BUKIT RAYA PEPUTRA 1037.104486
MARPOYAN DAMAI MAPOYANDAMAI_CR 241.5069876
TENAYAN RAYA TENAYAN_RAYA_PBR_GT 2116.77197
LIMAPULUH TANJUNG_RHU 238.7342171
SAIL SUKAMULYA 262.2879235
PEKANBARU KOTA GUBERNURAN_RIAU 162.2848372
SUKAJADI TVRI_PEKANBARU 680.4735496
SENAPELAN KAMPUNG_BANDAR 268.5824686
RUMBAI TENGKU_MAHMUD_PBR_PL 902.5812699
RUMBAI PESISIR ROAD_OKURA_PBR_TB 992.8651063
45. Network Audit
3. LAC Island//Mushroom with Voronoi
a. Go to Vector β Geometry Tools β Voronoi Polygons
b. Select Gsite on Input layer β Run
c. Use the following setting:
β Input layer: Voronoi polygons
β Dissolve fields: LAC
d. Run
e. Categorized thematic Dissolved layer to identify island/mushroom LAC
Result:
β’ There is a site with LAC 12 in LAC 11 area
β’ There is a site with LAC 13 in LAC 12 area