Uploaded by John Paul Bayes

QGIS CRaG Map Manual

advertisement
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
QGIS Coastal Resource and Gear (CRaG) Mapping
Frederick B. Cabactulan
Mindanao State University at Naawan
9023 Naawan, Misamis Oriental
Introduction
Resource mapping is a method for collating and
plotting information on the occurrence, distribution, access
and use of resources within the economic and cultural
domain of a specific community. The composition of the
output map reflects the perception and vision of the
participants about the resources and features they have been
portraying and provides an insight into the intimate relation
between the participating group and the resources (IIRR.
1998).
IIRR. 1998
These generated maps need to be transferred or reprocessed in order have a clearer and
durable generated information over time. GIS software, like QGIS, is recommended tool for such
processing. QGIS (previously known as Quantum GIS) is open source GIS software which is being
considered as official project of the Open Source Geospatial Foundation (OSGeo). It runs on Linux,
Unix, Mac OSX, Windows and Android and supports numerous vector, raster, and database formats
and functionalities. (https://www.qgis.org)
Folder System
In QGIS, you are working or producing a set of files called project. It is recommended that
you should have a folder system to organize the files. In this workshop follow the following steps to
establish a folder system for our project.
1. In your PC desktop (C:\...\Desktop) create project folder with named PROJECT # - <SURNAME>
2. Copy the content of the folder Input from the USB\CRaG_Workshop and paste it to your project
folder C:\...\Desktop\PROJECT... These are files of the needed icons and base maps for our
mapping workshop.
Starting a QGIS Project
Just like any windows application, you can open QGIS through the Start button
key
and click All ProgramsQGIS 2.18
or keyboard
. You can also open it through
double click of its desktop shortcut .
1. Usually, when opening QGIS the Tips window will be displayed. Click on OK.
Title Bar
2. You can start a new project through
Menu Bar
either of the following
 drop-down menu ProjectNew
 Toolbar button New
 Keyboard shortcut Ctrl + N.
3. To save a project, click drop-down menu
ProjectSave or Click on Save icon
or use
the
keyboard
Status Bar
shortcut
Ctrl + S. Then browse to the project folder
C:\...\Desktop\QGIS_CRaGMap
and type in File Name: San Agustin CRaG Map as your QGIS
project file name.
NOTE: Always have a practice of saving first a new project before start working with it.
5. Close the existing project and reopen it.
/fbcabactulan
Page 1
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
Loading/Adding, Getting Around, and Setting Properties of Layers
Adding Vector Layers
1. To add a vector layer, you may use either of the following techniques
 Click the add
 Using full down menu
 Using the keyboard
vector layer
LayerAdd Layer
shortcut Ctrl + Shift + V
button/icon
Add Vector Layer…
These will display the
window Add vector layer
2. In the Add Vector Layer window, click
button and navigate to the folder C:\...\Desktop\
PROJECT...\ INPUT\Vector Base Maps\Phil-Country, then select Country.shp and click
. And then in Add vector layer window click
. Phil-Country feature will then be
displayed on the map canvas.
You can also add vector layers by navigating in the Browser panel. Locate your project folder.
Expand the folder by clicking the plus (+) sign before the folder and expand the Vector folder.
Double click the displayed feature file to add it as layer.
3. Using any of these techniques, add also vector shape file CARAGA_MunCities.shp and
SDS_Barangays.shp.
4. Right click a layer at the Layers panel and click
to see the full layer extent.
Getting Around a Map
1. Zoom in to your target feature using the Zoom In tool on the Map Navigation toolbar. When using
the zoom tools, you can click and drag a box around the area you would like to zoom in to.
Touch zoom Pan
and pan
Identify
Feature
Pan map
to
selection
Zoom
in
Select Feature
by area or
single click
Zoom
out
Zoom
to
100%
Zoom
Zoom
Zoom to
to
Full Selection Layer
Zoom
Last
Zoom
Next
Show
Select
Open
Feature
Open Statistical
using
Deselect Attribute
Field Summary Measure
Equation Features Table Calculator
Line/Area
Refresh
Map
Tips
Text
Annotation
2. Use the Zoom In, Zoom Out, and Pan Map tools to move around the map, and the Zoom to Full
tool to go back to the full view.
3. Try also using the mouse wheel to Zoom In and Out the Map and long pressing the mouse wheel
and drag to Pan the map.
4. At Layers panel, click on the box before the layers to turn off and on the
layers in the Map canvas. Try turn off and on SDS_Barangays.
Layer Properties
1. Click SDS_Barangays in Layers panel to select the said layer.
2. Right click SDS_Barangays layer then click Properties. A Layer Properties window will appear.
/fbcabactulan
Page 2
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
3. Under Style, choose the color (e.g.
#f1f4a0) you want to render. You can also vary the Layer
transparency (e.g.
) under Layer rendering found in the lower part.
4. Under Labels, change “No labels” to “Show labels for this layer” and Label with Barangay. Use
the default font (MS Shell Dlg 2) but change font Size to 12.
5. Click Apply then OK.
6. For layer CARAGA_MunCities, make its Style Fill transparent with black outline of width 0.5, and
show its Label with Bold font Style of Size 14 and Type case of ‘All uppercase’. While for layer
Country select fill color
#61d19d and a transparent outline.
7. To display only the barangays of San Agustin. Right click SDS_Barangays
layer then click Filter… and type "MunCity" = 'San Agustin' on
Provide specific filter expression., or double click the field MunCity, click
, click
to display values for chosen field, double click
the value San Agustin. Then click OK.
Loading Raster
1. Click the Add Raster Layer icon (
). Or
2. Navigate to C:\...\Desktop\ PROJECT...\ INPUT \Raster Base Maps. Select San Agustin
Landscape.tif click Add. The San Agustin Landscape.tif raster layer will appear in the Layers
panel and visible in the Map canvas.
3. Bring San Agustin Landscape.tif raster layer below
CARAGA_MunCities layer but above Country layer by dragging it or
using
of the Layers panel.
Project Properties
1. At Menu bar, Click ProjectProject Properties…, the
Project properties window will appear.
2. At Project title, type “San Agustin Coastal
Resource and Fishing Gear Map”.
3. Set the Background color to
(#a3cdff),
and the Units for distance measurement to
Kilometer.
4. Click OK.
Adding the Project Icons Folder to System SVG Path
1. Click the Menu bar
SettingsOptions… which would
open the
window.
2. Click
and navigate to the
project icons folder
C:\...\Desktop\ PROJECT...\ INPUT \CRaG Icons
and click
.
3. Click OK
/fbcabactulan
Page 3
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
Creating Coastal Resource Vector Layer
Creating a Point Vector Layer
1. Click
or the Menu bar
which would open the New Shapefile Layer window.
2. On the Type, select
, and set the Selected CRS to WGS 84.
3. Supply the information for the New field Name: MunCity; Type:
Text Data; Length: 80, and click
which would add
MunCity to the Fields list. Other than id and MunCity, add also the
fields ResourceID, and Resources.
4. Click OK. It will add new layer on the Layers
panel, but will not yet appear in the Map canvas
since it is still blank.
Setting Resource Layer Properties
1. Click Resource Map in Layers panel to select the said layer.
2. Right click Resource Map layer then click Properties. Set the
Style to Rule-based.
3. Double click the first Label or select it and click
Edit rule window.
which will open
4. Type AR on Label, "ResourceID" = 'CR001' at Filter, Artificial Reef
at Description.
5. Enable Symbol, click Simple marker
type to SVG marker, set Size to 10, select
CRaG IconsCoastal Res… at SVG Groups,
and the appropriate icon at SVG Image.
, set Symbol layer
6. Click OK. It will set the properties for the first resource item setting.
7. For the succeeding resource item settings, click
to add item,
and do similar process 4 - 6 using the appropriate settings shown
on table below.
ID
Resources
Label
Filter
Description
Size
Rotation
1
Artificial Reef
AR
"ResourceID" = 'CR001'
Artificial Reef
10
0
2
Coral Reef
Coral
"ResourceID" = 'CR002'
Coral Reef
10
300
3
Fish Cage
FCage
"ResourceID" = 'CR003'
Fish Cage
10
0
4
Fish Corral
FCorral
"ResourceID" = 'CR004'
Fish Corral
10
0
5
Fish Landing
FLanding
"ResourceID" = 'CR005'
Fish Landing
10
0
6
Fish Pen
FPen
"ResourceID" = 'CR006'
Fish Pen
10
0
7
Fish Pond
FPond
"ResourceID" = 'CR007'
Fish Pond
10
0
8
Floating Restaurant FlotRest
"ResourceID" = 'CR008'
Floating Restaurant 10
0
9
Mangrove
Mangrove
"ResourceID" = 'CR009'
Mangrove
10
0
10
Proposed MPA
PropMPA
"ResourceID" = 'CR010'
Proposed MPA
10
0
11
Quarry
Quarry
"ResourceID" = 'CR011'
Quarry
10
0
12
Sanctuary
MPA
"ResourceID" = 'CR012'
Sanctuary
10
0
/fbcabactulan
SVG Image
Page 4
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
13
Seagrass
Seagrass
"ResourceID" = 'CR013'
Seagrass
10
0
14
Seaweed Farm
Seagrass
"ResourceID" = 'CR014'
Seaweed Farm
10
0
15
Wild Seaweed
FCorral
"ResourceID" = 'CR015'
Wild Seaweed
10
0
16
Tourist Spot
FCorral
"ResourceID" = 'CR016'
Tourist Spot
10
0
7. Click OK.
Putting Resource Icon on Map
1. Right click Resource Map layer then click
2. Click
.
at Toolbar.
3. Click on the Map canvas where you intent to put the
resource icon. The Resource Map – Feature Attribute will be displayed.
Supply the necessary entries. Make sure that the ResourceID really
correspond to the icon you wish to place on the map
4. Click OK.
5. Do the same for all other resources you wish to put on the map. See figure below as your guide.
Producing the output Resource Map
1. Click the menu ProjectNew Print Composer, or click the
New Print Composer icon , which would open the
Composer title window. On the title, type Resource Map
Click OK.
/fbcabactulan
San Agustin.
Page 5
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
2. The print composer window with
blank layout and with title
Resource Map San Agustin will
then be displayed.
3. On the composition panel at the
right side of the window, where
paper layout and print quality can
be set. For this workshop, just
use the default values:
Presets: A4 (210 x 297mm)
Number of pages: 1
Orientation: Landscape
Export resolution: 300 dpi
4. Click the menu LayoutAdd Map
, or just simply
click the Add new map icon ( ) at the right side toolbar
and draw a big rectangle in the blank map. Notice that the
map from the main frame is being drawn in the layout
Editing the Composer
1. Click on the rectangular frame in the layout and adjust the
size of the rectangle.
2. In the right side of the composer
window, click on Item properties
for Map 0
3. Click on Move item content icon
( ) to move the newly added
map and position it to its desired place. Also, can be zoom using mouse wheel scroll. To have
fine zooming, use combination of Ctrl + mouse wheel scroll. It is necessary to lock the map
layout so that it will not be affected on whatever changes might made on main window of QGIS.
4. Click on the Add new label icon (
) and draw text box.
5. Edit the text from the Item properties panel Label Main
properties and write ‘COASTAL RESOURCE MAP
San Agustin, Surigao del Sur’.
6. Click on Font to edit the text’s font and size.
7. In the Select Font window,
Font : MS Shell Dlg 2 (or any font you wish to use)
Font Style : Bold
Size : 24
/fbcabactulan
Page 6
Mindanao State University at Naawan
CRaG Mapping
Using QGIS
9023 Naawan, Misamis Oriental
Click OK
8. Click on Add new legend icon (
)
and draw a legend box.
9. On the Item properties Legend,
unselect Auto update.
click Toggle editing icon (
Legend items panel.
Select an item you wish to edit and
or double click the item from the
)
Click on plus/minus icons
to add or delete legend items in the layout. Remove
unnecessary items of the legend.
Right click a group/subgroup title Resource Map and click Hidden to undisplay it on layout.
10. On the Fonts,
Title Font : MS Shell Dlg 2 (or any font you wish to use)
Font Style : Bold
Size : 16
Click OK
Item Font : MS Shell Dlg 2 (or any font you wish to use)
Font Style : Normal
Size : 14
Click OK
11. To add an inset map, click the Add new map icon ( ) at the right side
toolbar and draw a rectangle on the portion for the shown inset map.
Take note that the map should display only Country layer and PHL_bays
layer that displays the label of the three bays.
12. Go back to the main window of QGIS and add the vector layer PHL_bays.
Set on its properties Style to No symbol, and its label set
to Shows labels… Label with Name, with italic font of size
13 and color blue.
NOTE: Body of water is usually in italic blue font.
13. In Layers Panel, uncheck layers except Country and PHL_bays layer. This
will change the display on the map canvas. But going back to the print
composer window, the layout remains the same since it was being lock before
changes were made in the Layers panel.
14. Click/select the inset map (Map 1), click on Move item content icon ( ) and edit/format the inset
map such that it displays the three bays (Lianga Bay, Hinatuan Bay, and Bislig Bay).
15. On the inset map (Map 1) Item properties Overview, click
Check Draw overview, set Map frame to ‘Map 0’, click
of the Frame style and set the following: Simple
fill, Transparent Fill (click ), black Outline, Solid
Fill style, Solid Outline style, Bevel Joint style,
and 0.50 mm Outline width.
Click Fill and set Transparency to 0%.
Click OK
.
16. Click on the Add image icon ( ) to
add images, like the ‘north arrow’ ,
and draw an image box on a desired place.
17. Notice that the Item properties at the right side were changed.
18. In the Search directories, choose a desired image of north arrow or search from other directories
or from downloads.
19. Optionally, arrow can also be included. Click on the Add arrow icon (
the desired arrow location.
/fbcabactulan
) and draw the arrow on
Page 7
Mindanao State University at Naawan
9023 Naawan, Misamis Oriental
20. Click on
CRaG Mapping
Using QGIS
to export as image or as SVG or as PDF, respectively, the image.
21. You will be prompt to save the image in the desired directory. Save it in
C:\...\Desktop\PROJECT...
22. An Image export options window will appear and follow the
shown inputs.
23. Click Save.
24. Close the composer and the project.
25. From your directory, open the newly exported map.
/fbcabactulan
Page 8
Download