QGIS Tutorial by Indo-RNO v1.4
QGIS Tutorial by Indo-RNO v1.4
“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-
Release Note
Mapinfo
Alternative
FREE! Powerful!
Getting
Better,
Better and
Better!
Supported by QGIS Developer
Community
Table of Content
1. Installation 9. Save / Export Layer b. Join Attributes Data inside Polygon
a. Program a. Export to CSV, XLSX, SHP 17. Heatmap
b. Plugin b. Export to Google Earth (KMZ) a. Basic Heatmap
c. Material c. Export to MapInfo (TAB) b. IDW Interpolation
2. Basic Principle d. Export to JSON/TopoJSON c. Linear Interpolation
a. File Type e. Export/Change CRS to Pseudo-Mercator 18. MR/Covmo 40x40 meter
b. CRS 10. Contour/Elevation Check a. Change Scale MR for Display Only
3. Frequently Used Symbols 11. Selection and Query b. Create MR Square/Grid Shape Permanently
4. Display Basic Accessories on Canvas a. Manual Select on Canvas 19. Spider Graph Neighbor Relation
a. Scale b. Filter Expression by Script a. Incoming
b. Image c. Select Data by Polygon b. Outgoing
c. Compass 12. Edit Layer 20. Map Reporting
d. Title a. Change Value of Column 21. Network Audit
e. Copyright b. Change Table Structure a. Inter Site Distance (ISD)
f. Annotations c. Split Polygon b. Long Lat of Center Polygon
g. Google Map d. Move Polygon c. Nearest Site to Polygon
5. Open File e. Rotate Polygon d. LAC Island//Mushroom with Voronoi
a. Vector: TAB/MIF/SHP 13. Clipping by Polygon e. Automatic Distance Measure of Line
b. Raster: Google Map/Earth, Elevation a. Vector 22. Tips
c. Text: CSV b. Raster a. Show Gcell Long Lat Label into single value
d. Excel: XLSX 14. Create Shape b. Show Count of Feature on Layer Panel
6. Download Raster for Offline Use a. Border Polygon c. Fixing Error: Invalid Geometry or Layers
a. DEM/Contour/Elevation b. Route Line were not correctly generated
b. Google Map c. Buffer d. Copy Paste Feature
7. Searching and Finding d. POI Based on Long Lat e. Reduce File Size of Polygon
a. Search Location by Long Lat e. Gcell
b. Copy Long Lat of Location f. Grid
c. Search Value on Layer 15. Append / Merge
8. Thematic Layer a. Join Layers by Same Column
a. Add Color on Layer b. Join Attributes Data inside Polygon
b. Add Color on Raster 16. Join Layer
c. Add Label a. Join Layers by Same Column
Contributors
Aldindha Octa Airlangga
[email protected]
https://www.linkedin.com/in/aldindha/
Anhar Nurjadi
[email protected]
https://www.linkedin.com/in/anhar-nurjadi-2b636634/
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. Lat Lon Tools
g. KML Tools
h. QCopyCanvas
i. QuickMapServices
j. TopoJSON Writer
Zoom In See Info of Feature Move Label Add Annotation Text to Canvas
Search Layers
Create New Shapefile Edit Layer Add Polygon/Line Contour Check
d. Title Label
b. Image
2. Go to Edit → Annotation → Text Annotation →
Enter Image file path Click on Canvas → Double click on box created →
Setting Opacity to 0% on both Linked layer and
Map marker
After
Export/Save Layer
1. Export to CSV, XLSX, SHP
a. Right Click on layer → Export → Save Feature As
b. On Format select any file type to save
c. On File Name select file path to save
d. Herewith frequently saved file type:
✓ ESRI Shapefile: SHP
✓ Comma Separated Value: CSV
✓ Mapinfo TAB: TAB (On Symbology export select Feature Symbology)
✓ Ms Office Open XML Spreadsheet: XLSX
e. Click OK
Export Layer
2. Export to Google Earth (KMZ)
a. Go to Vector → KML Tools → Export KMZ
b. Setting as the following:
✓ Input Layer: a layer to be exported. Ex: Gcell
✓ Name/Label field: a field/column to be labelled on KMZ file. Ex:
Sitename
✓ Checklist Export style for single, categorized, and graduated symbols
✓ Output KMZ file → Save to a File: Output file path
c. Click Run
d. After finished .KMZ file can be opened on Google Earth
KMZ file opened in Google Earth
* Ex: Select feature from (MR), By comparing to the features from (Polygon Kota
Pekanbaru) → Result: All MR inside polygon Kota Pekanbaru are selected
After
Edit Layer
Right click on layer → Toggle Editing
Before Select Feature and Rotate Move “+” mark and set rotation degree After
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
Clipping by Polygon - Result
Vector → Gcell inside Kota Pekanbaru only Raster → .TIF of Google Map inside Kota Pekanbaru Only
Clipping Raster + Vector based on Polygon
1. Add layer vector to show + layer border polygon to clip (no need to show
on Canvas) + Google Earth/Satellite
2. Go to Project -> Import/Export → Export to Image → Map Canvas
Extent → Save to .TIF image
3. Add the saved .TIF image to Layer Panel
4. Go to Raster → Extraction → Clip Raster by Mask Layer
5. Right click on Clipped raster → Export → Save As → Format to GeoTIFF
→ OK
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
Create Shape – Polygon and Route → Result
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
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
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
* Horizontal and Vertical spacing value and unit can be adjusted depend on requirement
Result
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
Append / Merge - Result
Join Layer
Before
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
After
Join Layer Gcell with 38 fields (0-37) POI with 13 fields (0-12)
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
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
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
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
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) Resul
d. OK t
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
MR/Covmo 40x40 meter - Result
Result
Angle and Radius
* Radius is a distance from center point to elbow
0o
Angle
45o
c
b
𝑐
𝑅𝑎𝑑𝑖𝑢𝑠 =
2
Spider Graph Neighbor Relation
Outgoing Add Layer Incoming Add Layer
1. Add Gcell layer → Add Neighbor Relation layer
2. When Add Neighbor Relation layer select X and Y fields as
the following
a. Outgoing: Use Long and Lat of Target Cell
b. Incoming: Use Long and Lat of Source Cell
3. Select feature of a cell on Canvas to see relation
4. Go to Processing → Toolbox → Search Join by Lines (hub
lines)
5. Use the following setting:
a. Outgoing:
✓ Hub Layer: Neighbor Relation
✓ Hub ID field: Source Cell
✓ Spoke layer: Gcell
✓ Selected field only: Checklist
✓ Spoke ID field: Cellname
b. Incoming:
✓ Hub Layer: Gcell Outgoing by Join Lines Incoming by Join Lines
✓ Selected field only: Checklist
✓ Hub ID field: Cellname
✓ Spoke layer: Neighbor Relation
✓ Spoke ID field: Target Cell
Picture
Scale Bar
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
Result
Network Audit
3. 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
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
Network Audit
4. 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
Network Audit
5. Automatic Distance Measure of Line
a. Open Vector of Line shape. Make sure CRS is Pseudo-Mercator
b. Go to Vector → Geometry Tools → Add Geometry Attributes
c. Select Line shape layer on Input layer → Run
d. Right click on Result layer to see Length column
Result
Tips - Show Gcell Long Lat Label into single value
1. Show Gcell Long Lat Label into single value
a. Click Coordinate X and Y → Field type: int, double, string → change to Long Lat of layer
b. Click Coordinate X and Y again → Edit
c. Add “+0.001” after Long/Lat → OK
d. OK
Tips - Show Gcell Long Lat Label into single value
Before After
Tips - Show Count of Feature on Layer Panel
2. Show Count of Feature on Layer Panel
To show count of value feature after thematic
a. Right click on layer → Show feature count
Tips - Fixing Error: Invalid Geometry or Layers were not correctly generated
3. Fixing Error: Invalid Geometry or Layers were not correctly generated
Error found during Clipping or Extraction:
Comparison Result