Vous êtes sur la page 1sur 6

TUTORIAL 2 | 1

TUTORIAL 2: Barangay Daraga MPA

NEW SKILLS:
1.
2.
3.
4.
5.

Converting between Degrees Minutes Seconds and Decimal Degrees


Editing a polygon and using the Snapping feature
Calculating area and measuring distance
Georeferencing an image
Making a map using QGISs Print Composer

PART I: Mapping of Daraga MPA and Buffer Area


1. You are given the following coordinates of Daraga MPA and its buffer in Degrees Minutes
Seconds. Convert them into Decimal Degrees so that we can open it up in QGIS. Put the
converted coordinates into an excel file with the following rows: waypoint name, longitude,
and latitude.
Table 1: Daraga Core Zone
Waypoint

Longitude (X)

Latitude (Y)

D1

12350'45.13

1355'42.11

D2

12351'0.98

1355'42.13

D3

12351'1.08

1355'23.43

D4

12350'45.34

1355'23.35

Table 2: Daraga Buffer Zone


Waypoint

Longitude (X)

Latitude (Y)

DB1

1355'43.69

12350'39.36

DB2

1355'44.02

12351'16.36

DB3

1355'21.73

12350'39.37

DB4

1355'21.77

12351'16.48

Conversion from DMS to Decimal Degree


Decimal Degrees =Degrees + (Minutes/60) + (Seconds/3600)
1. Add Degrees to Minutes/60
2. Add the value result in step 1 to Seconds/3600 to get decimal degrees
2. When your data is in an excel file, Save As a .csv (comma separated value) file.
3. Open up your data in QGIS via Layer > Add Delimited Text Layer.
4. Make sure that you click Selected delimiters and that you select Comma. (This
tells QGIS how the rows are broken up in the CSV file, which is by a ,). Longitude is your
X-field and Latitude is your Y-field.

TUTORIAL 2 | 2

5. These coordinates are in WGS1984 so select it when prompted for the projection.
6. All the points will be shown, but we need to have two separate files: 1) Core Zone and 2)
Buffer Zone. We parse them out by selecting all four Core Zone points and then Save
Selection As The same process is repeated by selecting all four Buffer Zone points
and then saving via Save Selection As
7. Now that our two point files are ready, we will create a polygon from the points (similar to
the way we created the line file for the municipal waters). Do this by Vector >
Points2One > Points2One.
8. Input the appropriate point layer and the Output Geometries should be set to
Polygons.
9. For the buffer file, your polygon will look like this:

The function Points2One drew the vertices in the wrong area. We can correct this by going
into the Editing mode (clicking the Toggle Editing button).
10.We will use the Node Tool (
) to edit the vertices. But first, lets set the snapping
tolerance.
11.Set the snapping tolerance to 0.0000500 mapping units by going to Settings >
Snapping Options Be sure to check the box for your Buffer Zone points and the
Buffer Zone polygon.

12.Now, edit your vertices and then Click the Save button and then Toggle Edit button to
turn off editing.
PART II: Calculating Area and Measuring Distance
1. In order to calculate area and measure distance in units we can understand, we need to
project our two files into PRRS92 Zone 4 by right-clicking each file and then clicking

TUTORIAL 2 | 3
Save As Next, make sure that Encoding is set to System and Project CRS.
Choose PRS92/Philippines zone 4 for the CRS field.

2. Now, we can have QGIS calculate area for us by Vector > Geometry Tools >
Export/Add geometry columns. Select your Core Zone polygon file (that was just
projected) and Click OK. Do the same for your Buffer Zone polygon.
3. Open Attribute Table for both of the polygons. There are two new columns named
AREA and PERIMETER. The area values is in meters-squared while perimeter is in
meters. If you want to get hectares, divide the area by 10,000.
4. To measure distances use the Measure Line tool. Unclick Ellipsoid. Because our
map is already in a projected map system, we will be measuring over a plane versus over
an ellipsoid. For large areas (across countries), youll probably want to use an ellipsoid.
5. Now we want to have the area of just the buffer minus the core zone area. We can simply
subtract the area of the buffer zone from the core zone area. However, if we also want to
know perimeter, it will be useful to do this by using the Differencing tool. To do this, go to
Vector > Geoprocessing Tools > Difference. The Input vector layer is the Buffer
Zone and the Difference layer is the Core Zone. Now use the Add/Export geometry
columns to get area and perimeter.

PART III: Adding a basemap image from Google Earth


1. Now we want to add a basemap image from Google Earth. We do this by saving an image
from Google Earth and marking four ground control points. To save time, I will show you a
quick tutorial. We will use the google earth basemap image in your tutorial folder. The
steps are outlined below, but we will continue to step 2.
a. Open Google Earth and zoom to the area extent of interest.
b. Go to View > Reset > Tilt and Compass to make sure you are getting an
orthogonal view of the data.
c. Add four placemarks at the four corners of the image extent using the target
marker (
) and record the latitude/longitude for each point. These will be your
source coordinates.

2. Raster > Georeferencer > Georeferencer.

TUTORIAL 2 | 4
3. Open the google earth image raster file (GoogleEarth_Lahuy.jpg) from your tutorial
folder through the Add Raster Layer button (
). You will be prompted to identify the
Coordinate Reference System for the image, which is Google Mercator (EPSG: 900913).
4. Click the Add Point button (
)
5. Zoom into one of the points. Then add the point in the center of the first point you
zoomed into. It will then prompt you for enter map coordinates. Enter in the corresponding
coordinates from the box below collected from Google Earth.

Table 3. Google Earth Image reference coordinates


Location

Latitude
Longitude
(Y)
(X)
Top Left
13.99544
123.7653
Top Right
13.9954
123.9064
Bottom Left
13.88441
123.7594
Bottom Right
13.88578
123.9086
6. Once you have entered in all four ground control points, we will change the
Transformation settings. Go to Settings > Transformation Settings. Make sure that
the Transformation type is Linear, the Resampling Method is Cubic. Save the output
raster as a new file and let the Target SRS be WGS1984 or ESPG:4326.

TUTORIAL 2 | 5

7. Now, Click the Start Georeferencing button (


) to begin the transformation process.
The new file should be added to your table of contents on the main screen. Exit the
Georeferencer.
8. You can add other vector data to make sure the georeferencing is more or less correct.

PART IV: DISSOLVING TOOL


1. We will use the Dissolve function to get a shapefile of only the municipality of Caramoan
to add to our map. (We have this already, but this is to show concept).
2. Go to Vector > Geoprocessing Tools > Dissolve.
3. Your Input vector layer is the Caramoan Barangay shapefile. The Dissolve field is
NAME_2, which contains the name of the municipality. This tells QGIS to dissolve all
borders whenever the entries in the NAME_2 field are the same. In this case, its all
barangays.
PART V: MAKING A MAP
You will use the Print Composer to make a map in QGIS. It is important to remember that the
extent viewed in the QGIS main desktop browser will be the map that is seen when it is added
into the Print Composer. If you want to update the maps extent and zoom, you will have to do
it in the QGIS Desktop.
1. To make a new map go to File > New Print Composer.
2. Add your map using the Add new map button (
). Hold your mouse down and make a
rectangle where you want to put the map frame. To edit the view or zoom of the map, go
back to QGIS Desktop to get the appropriate view. If you want the map to not be affected
by changes in QGIS Desktop, click Lock Layers for map item in the Item Properties
tab.

TUTORIAL 2 | 6

3. Add a legend by using the Add legend button (


). You can edit the information you
want on the map by exploring the Item Properties tab > Legend items tab at the rightside menu.

4. Adding a north arrow as an image (

) or a simple arrow (

).

5. Adding a scale bar by using the Add new scalebar button (


). Edit the tab Item
Properties to change the map units and other features.
a. Segment size: refers to how long you want each segment in the scale bar to be. We
will use 500 units (because our map is projected into PRS 92 Zone 4 this is
equivalent to meters).
b. Map units per bar: refers to the map units for our purposes, we want to show
kilometers so this will be 1000.
c. The number of segments can be changed, but for our purposes we will set this to 2
Right segments (the default).
d. We can also leave the Style as Single Box (you can use another style).
e. For the Unit label, write in kilometers.
6. To add a title use the Add new label button (

).

7. To add coordinate system information also use the Add new label button (
) and
write the map projection, date the map was created, and other information needed.
8. Go to File > Export as (Image, PDF, etc) and choose the format you wish to have
your map exported.
Tip: Right-clicking any object added to the map composer locks the item.

Vous aimerez peut-être aussi