You are on page 1of 2

Phoebe Marie L. Calo. BSABE 3.

GE137-TUVW1

NARRATIVE REPORT No. 6:


Basic Data Manipulation and Analysis

Objectives
This exercise aims to teach the participants on how to use QGIS for other basic
vector data manipulation and analysis such as spatial queries and spatial joining.

A. Spatial Queries
• Using the Spatial Query tool, you can directly select features from an overlapping
vector datasets. The tool has several functions in selecting features as seen below.
For this exercise, we can now determine buildings located in Barangay Ampayon
that are flooded or intersect to the inundation boundary.
• Add Buildings_Ampayon.shp and InundationBoundary_Ampayon.shp layers
and open Spatial Query tool.
• We have to Input the Buildings_Ampayon.shp for the Select source features from
and use the Intersects function for the Where the feature.
• To InundationBoundary_Ampayon.shp to Reference features to.
• Then, click Apply. The buildings that intersect the flood hazard map are highlighted
in the map. At the side of the Spatial Query dialog box, the selected building
polygons are listed.
• Try the other Spatial Query feature selection methods with the same features and
compare the resulting selections.
• Next, try to use the buffered road network of Ampayon done in the previous exercise
and do the same spatial query with the buildings in Ampayon.

B. Spatial Joining
• The target layer to be given with a new attribute is the urban building shapefile.
The urban buildings will be inputted with the hazard level attribute of the flood
hazard map using spatial join. In this process, the Join Attributes by Location
tool will be used and add Buildings_Ampayon.shp and
InundationBoundary_Ampayon.shp layers 13. Go to the Vector menu > Data
Management tools > Join attributes by location.
• Then Input the “Buildings_Ampayon” shapefile as the Target vector layer.
• The “InundationBoundary_Ampayon” as the Join vector layer.
• Select “Intersects” as the Geometric predicate and et the Precision and
Attribute summary unchanged. Erase the default values
“sum,mean,min,max,median” in the Statistics for summary.
• In the Joined table, from the dropdown list, select the “Keep all records
(including non-matching target records)”. Then, in Joined Layer, browse your
Output directory folder and save the output file name as
Buildings_Ampayon_FloodAffected.shp.Keep resulting attribute table of the
joined layer is as shown below. The attributes in the hazard is added in the
building shapefile. Unnecessary fields may be deleted in the attribute table.

You might also like