Вы находитесь на странице: 1из 73

Disclaimer

This document is initial draft and still in reviewing phase by these


parties:

 Badan Nasional Penanggulangan Bencana (BNPB)


 Australia-Indonesia Facility for Disaster Reduction (AIFDR-
DFAT)
 Humanitarian OpenStreetMap Team (HOT)

All contents and materials on this document possibly changed without


public notice.

License

All contents and materials on this document is licensed as Creative


Commons

Attribution Australia (CCbyA).

You are free:

- to copy, distribute, display, and perform the work

- to make derivative works

- to make commercial use of the work

You must give the original author credit.

More information about CCbyA License:

http://creativecommons.org/licenses/by/3.0/au/deed.en_GB

Unit 4: QGIS and InaSAFE Intermediate Level | 2


About Us
Badan Nasional Penanggulangan Bencana (BNPB)

BNPB is Indonesia’s National Disaster Management Agency. BNPB is


a non-departmental ministerial-level government agency, tasked with
providing guidance and direction to the efforts of disaster
management that includes disaster prevention, emergency response,
rehabilitation, and reconstruction in a fair and equal. National Disaster
Management Agency has the function as a policy maker and
formulator and Refugee (IDP) management to act quickly and
appropriately and effectively and efficiently; and coordinating the
implementation of disaster management activities in a planned,
integrated, and comprehensive.

http://bnpb.go.id

Australia-Indonesia Facility for Disaster Reduction


(AIFDR)

Unit 4: QGIS and InaSAFE Intermediate Level | 3


The Australia-Indonesia Facility for Disaster Reduction (AIFDR) is a
joint initiative between the governments of Australia and Indonesia.
We work to strengthen Indonesia's ability to reduce the impact of
disasters. The Australian and Indonesian governments at a special
ceremony on 15 July 2010 launched the Australia-Indonesia facility.
The launch marks an important event in the strong relationship now
shared by both countries and their united commitment to better
prepare for and respond to natural disasters in Indonesia.

http://aifdr.org

Humanitarian OpenStreetMap Team (HOT)

Free, collaborative maps are uniquely valuable to humanitarian work,


especially in places where base map data is often scarce, out of date,
Unit 4: QGIS and InaSAFE Intermediate Level | 4
or rapidly changing. OpenStreetMap is a web project to create a free
and open map of the entire world, built entirely by volunteers
surveying with GPS, digitizing aerial imagery, and collecting and
liberating existing public sources of geographic data. The
Humanitarian OpenStreetMap Team (HOT) is an initiative to apply
the principles and activities of open source and open data sharing
towards humanitarian response and economic development.

http://hot.openstreetmap.org

Universitas Gadjah Mada (UGM)

Universitas Gadjah Mada (internationally known as Gadjah Mada


University; Abbreviation : UGM) is an Indonesian public ivy league
research university located in Yogyakarta, Indonesia. Department of
Geodetic Engineering, Faculty of Engineering focuses on education,
research, and commmunity services related to geodesy and geomatics
engineering, including acquisition, analysis, and uses of detailed and
accurate geospatial data and large-scale maps using open source
geospatial software for disaster management.

http://ugm.ac.id

Unit 4: QGIS and InaSAFE Intermediate Level | 5


Preface
Welcome to the Intermediate Unit on Spatial Analysis. By now you should be
adept in data collection techniques and have a solid foundation in analysis with
QGIS. In this unit we will be focusing again on InaSAFE and QGIS skills that aid
in contingency planning.

First, we will undertake a review of unit 2, to ensure that we remember all the
QGIS skills that we studied. Then we will begin working on another InaSAFE
project using flood data as our hazard. We will consider the best possible
evacuation routes and locations for IDP camps, calculate damages and losses and
learn how to display them on a map.

This unit covers much of what we have been working toward. We will bring
together the data which we now know how to collect in OpenStreetMap, QGIS
spatial analysis skills, and the power of InaSAFE to help develop effective and
informative contingency plans.

Unit 4: QGIS and InaSAFE Intermediate Level | 6


TABLE OF CONTENTS

Disclaimer.........................................................................................................1
License..............................................................................................................1
About Us...........................................................................................................2
Preface..............................................................................................................3
Review Quantum GIS.........................................................................................5
Preparing Data and Keywords for InaSAFE.........................................................9
Determining IDP Camp Location......................................................................17
Planning Evacuation Route Based on Hazard Information................................24
Calculating Damage and Losses.......................................................................27

Unit 4: QGIS and InaSAFE Intermediate Level | 7


Module 1
Review Quantum GIS

Learning Objectives
● Identify data types in QGIS

● Explain about data symbology

● Explain about map layout

Before we dive deeper into InaSAFE, we will spend this Module in a review of the QGIS
techniques that we covered in Unit 2. We will once more go over some of they key
aspects of QGIS, including adding vector and raster layers, symbolizing layers, and using
the Print Composer for layouting. If you feel competent in all of these areas, feel free to
jump ahead to the next Module, but if you’d like a brief review, follow along!

1. Data Types in Quantum GIS

As you may recall, there are two types of data that we often use in QGIS: raster data and
vector data. Raster data is characterized as an array of data which consists of rows and
columns, like the pixels in an image. Vector data, on the other hand, consists of discrete
features made of points and lines, and their position is defined by coordinates.

1.1 Adding Vector Data

Let’s add vector data to a new project.

● Open a new QGIS project. Your map and Layers list should be empty.

● There are two ways to add a new vector layer to your project. You can navigate to Layer
> Add Vector Layer... on the menu or you can click on the “Add Vector Layer” button on
the toolbar:

● If you can’t find the toolbar button, right-click the toolbars and make sure that the box is
checked next to “File.”
Unit 4: QGIS and InaSAFE Intermediate Level | 8
● The “Add vector layer” dialog looks like this:

● Click on the Browse button and navigate to your exercise data. Go into the qgis/Sleman/
directory and select Jalan_Sleman_OSM, POI_Sleman and Kecamatan_Sleman. You
can select multiple files by holding the CTRL key on your keyboard as you click each
file.

● Click “Open” and then “Open” again.

● Your map canvas now will looks like this:

Great! You’ve added some vector data to your map. Don’t forget there are three
kinds of vectors - points, lines, and polygons. We have just added one layer of
each type.
Unit 4: QGIS and InaSAFE Intermediate Level | 9
1.2 Adding Raster Data

Raster data has different characteristics compared to vector data. Raster data is composed
by rows and columns which form small boxes (known as pixels). The ‘box’es contains
information, which is usually expressed as grayscale or color. The information in each
pixel could be the altitude of a point, the size of the population, the area’s color, and so
forth.

● There are two ways to add a new raster layer to your project. You can navigate to Layer
> Add Raster Layer... on the menu or you can click on the “Add Vector Layer” button on
the toolbar:

● Navigate to qgis/Sleman/SRTM/ and select SRTM_Sleman.tif, which depicts the


topography of the area.

● Click Open. The raster will be added to our project as a grey-colored square.

Next we will symbolize the data to make it easier to understand.

Unit 4: QGIS and InaSAFE Intermediate Level | 10


2. Symbolizing Data

Layer symbology is useful so that users can easily understand our maps. It is also
important to make our maps more attractive. Your choice of a layer’s symbology is very
important to deliver the right information.

2.1 Symbolize the Districts

Let’s symbolize the district layer that we’ve added:

● Right click on the Kecamatan_Sleman layer, and choose Properties, or double click the
layer name.

● Click on the Style tab.

● Notice all the options that we have to change the appearance of this layer. We can change
the layer’s transparency or its color.

● We can also base the symbology on the data contained in the layer itself.

● Click on the box that says “Single Symbol,” and change it to “Categorized.”

Unit 4: QGIS and InaSAFE Intermediate Level | 11


● Change the Color Ramp to a set of colors that you like, and then click “Classify.” It may
look something like this (although your colors will be different):

● Click OK to apply the style changes.

2.2 Symbolize the Roads

Next, let’s symbolize our roads layer.

● Double-click Jalan_Sleman_OSM in the Layers list to open the properties dialog.

● Click on the “Style” tab.

● Adjust the color as you like, or choose one of the style presets that are displayed at the
bottom.

● Feel free to experiment, you can make changes, click “Apply,” and view your changes on
the map until you are satisfied.

● If you use multiple symbologies (as we covered in Unit 2), your roads may end up
looking like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 12


● This isn’t ideal. To fix this, open the Properties dialog and on the Style tab click on the
“Advanced” button and choose Symbol Levels. Check to box next to “Enable symbol
levels.”

● The roads will then look correct:

Unit 4: QGIS and InaSAFE Intermediate Level | 13


Try editing the symbology of the POI_Sleman_OSM layer on your own.

2.3 Editing Raster Symbology

Lastly, let’s fix our raster layer so that it doesn’t look just like a grey rectangle.

● Make sure that the raster toolbar is activated. It should look like this:

● Select the SRTM_Sleman layer and click the “Stretch Histogram” button.

● Your map should end up looking something like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 14


3. Map Layout

Your map is a medium to communicate information (as well as your ideas) to your map’s
reader. You use layer symbology to convey the content of your data so that it can be
easily understood by the user. By creating a map layout, you are going a step further in
using your map as a way to convey information.

For a full review of Map Composer, refer back to Unit 2. For now, let’s create a basic
layout with a legend.

● Start a new Map Composer window by going to Project > New Print Composer

Unit 4: QGIS and InaSAFE Intermediate Level | 15


● Create a unique name for your layout.

● Click the “Add new map” button and draw a box on the left side of the canvas.

● Now click on the “Add new legend” button and draw a box on the right side of the
canvas.

● Your map will look similar to this:

Play around a bit with the Print Composer if you like, and refresh your memory!

We hope this was a useful refresher. Now it’s time to get back to InaSAFE!

Unit 4: QGIS and InaSAFE Intermediate Level | 16


Module 2
Preparing Data and Keywords for
InaSAFE

Learning Objectives
● Explain about input

● Getting OSM data from OSM Downloader Tool

● Load data

● Add keywords

● Prepare hazard layer

● Run InaSAFE

Now you you know your way around QGIS and InaSAFE, let’s dive deeper. In this
Module, you will see how to prepare your own data so that it can be processed in
InaSAFE. Much of what we cover in this Module you’ve already done, although we will
go over some of it in more detail. We’ll be using the project created in this Module
throughout the rest of the unit, so be sure to save it along the way!

1. Review about Inputs

Let’s review the types of data used by InaSAFE.

Hazards are conditions, phenomenon, or human activity that potentially cause victims
and destruction to society and environment. Frequently observed hazards are
earthquakes, tsunamis, floods, landslides, and tornadoes.

When we are working in InaSAFE, hazard data refers to a vector or raster dataset that
represents the level and magnitude of an event that can potentially cause damages. To be
Unit 4: QGIS and InaSAFE Intermediate Level | 17
used for impact calculation in InaSAFE, level and magnitude of an event scenario must
be mapped over the area of interest. This means that hazard data must be geographic - it
must have location. We have already looked at hazard data for the 2007 Jakarta Flood
and the Lembang Earthquake. These hazard layers were produced from scientific
modeling conducted by scientific organizations and government agencies. These are
typical sources for such hazard data, although in cases of flood hazards such data may
also be gathered from affected communities.

Generally, hazard data has the following characteristics:

● are at a particular location

● have a measured intensity (ie. the depth of a flood or the MMI of an earthquake)

● have a measured duration of impact (ie. hours or days after a flood)

● have a certain time frame (ie. in the case of a sea rise flood)

In this Module, our hazard input will be a flood in the village of Sirahan, in Magelang
regency in Central Java. The data for this flood comes from participatory mapping
activities done by community members as part of the REKOMPAK project. The data is
in the training folder qgis/Sirahan/.

Exposure data refers to natural and man-made objects that may be affected if a disaster
scenario really happens. In this Module we will use building exposure data created in
OpenStreetMap.

The InaSAFE impact functions produce an output layer representing potential damages
or losses on the affected exposure layer. This output layer will be created once the impact
calculation process is finished processing. InaSAFE has many impact functions
available, which are listed through the 'Impact Functions Doc' menu (see below). The
impact calculation will only be possible when users provide the hazard and exposure
layer data sets and, when necessary, users define the required parameters through the
keyword editor correctly.

Unit 4: QGIS and InaSAFE Intermediate Level | 18


Aggregation is used to reclassify the result of the impact calculation according to a
specific administrative boundary level.

Keywords define which category a dataset belongs to, whether hazard or exposure. They
are also used to define specific parameters to be considered, as we shall see.

After you calculate the impact of a scenario with InaSAFE, what next? Well, the impact
calculation can be used to prepare a contingency plan. That's why relevant questions and
remarks are displayed in the Result section, which may then be considered by disaster
risk managers or planning managers.

Unit 4: QGIS and InaSAFE Intermediate Level | 19


2. Getting OSM Data from HOT Exports

In previous scenarios, we used example data provided in the training directory, but to set
up our scenario in the village of Sirahan, let’s access the OpenStreetMap data ourselves to
use as our exposure layer. We will use the OSM buildings to calculate how many
buildings (and which) will be inundated when a flood occurs similar to our hazard model.

We’ve worked with OpenStreetMap data a lot already. Now we will utilize a website
where we can quickly and easily access the data from OSM.

● Open your web browser and navigate to export.hotosm.org. The site will look like this:

The HOT Export website allows you to choose an area and create a data extract from that
area. Then you can download the data in a variety of formats that are easily read by
QGIS.

● Login with your hot-export account

● In the upper right corner, click “New Job.”

● Give the job a name, such as “Desa Sirahan”

● Zoom in on the map until you can see the village Sirahan, which is just northwest of
Yogyakarta.

● Click “Select Area” and then draw a box around Sirahan village.

Unit 4: QGIS and InaSAFE Intermediate Level | 20


● The page should look somethings like this:

● Click the “Create Job” button.

● You will be asked to define a presets file - this is like the presets that you added to JOSM
in the previous unit, except here, they define the attributes that InaSAFE will provide.
Choose “preset file-INASAFE.”

Unit 4: QGIS and InaSAFE Intermediate Level | 21


● Click the “Save” button.

● Take a few breaths! It may take a few minutes for the data extraction job to process.
When it is finished, the page will change and you will see a list of files you can download
like this:

● Click on “ESRI Shapefile” to download shapefiles, and once you have it, extract (unzip)
the archive on your computer. It should create a directory named extract.shp

3. Load Data

Unit 4: QGIS and InaSAFE Intermediate Level | 22


● We will use this OpenStreetMap data as our exposure data. Open a new QGIS project
and add all of the shapefiles that you downloaded as vector layers. You should have four
layers:

For reasons that will become clear later, we need to change the map projection from the
default OSM projection (WGS 84) to WGS 84 / UTM 49S. In other words, we need a
CRS that uses meters, not degrees.

● Right click on the planet_osm_polygon layer and click ‘Save as’.

● Click Browse and navigate to a place where you would like to put the new shapefile.
Name the file Bangunan_Sirahan and click “Save.”

● Next to CRS, click “Browse.”

● In the filter box, type “UTM zone 49S”, as shown below:

Unit 4: QGIS and InaSAFE Intermediate Level | 23


● Select the CRS “WGS 84 / UTM zone 49S” and click OK.

● The “Save vector layer as...” dialog will look like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 24


This is the layer that we will be using as our exposure data. You can remove the other
OpenStreetMap layers, or if you would like them to remain visible, go to Project >
Project Properties and enable “on the fly” transformation.”

4. Adding Keywords

Since we’ll be using this buildings layer as our exposure, we need to set the keywords so
that InaSAFE knows what the layer contains. If you remember from Unit 2, this is done
with the keywords editor.

● Select the Bangunan_Sirahan layer in your Layers list and then click the “Keyword
Editor” button on the InaSAFE toolbar.

Unit 4: QGIS and InaSAFE Intermediate Level | 25


● Adjust the settings so that the keyword editor looks similar to the following: Most likely
you will only need to change the subcategory field to “structure.”

● Now we will do something new, which is to add advanced keywords. Click on the “Show
advanced editor” button.

● You can add keywords manually using the advanced editor.

● Manually add a keyword so that the value of datatype is osm. It should look like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 26


● Click OK. You should see the layer appropriately loaded in the InaSAFE panel.

5. Preparing Hazard Layer

The hazard data that we have used previously has come from government agencies and
scientific institutions. This time, we will use data that came from community mapping
activities, that is, from regular community members on the ground. The data was created
as a paper map and later converted into digital format. The data has already been
prepared, so we simply need to add it as our hazard layer.

Unit 4: QGIS and InaSAFE Intermediate Level | 27


● Click “Add Vector Layer...” and add area_terdampak_Sirahan.shp in the qgis/Sirahan
directory.

● You can see that this layer is already known to InaSAFE, so presumably it has keywords
already set. Select the layer and open the keywords editor.

● Notice that the subcategory is set to “flood [wet/dry].”

Unit 4: QGIS and InaSAFE Intermediate Level | 28


● Because of the way that InaSAFE calculates this function, we need to make sure that this
exposure layer has a column in the attribute table that InaSAFE expects, named
“AFFECTED”

● Click OK and then open the attribute table for the area_terdampak_Sirahan layer.

● We need to add some data to this layer so that QGIS can run the flood function correctly.
When QGIS runs the flood function, it checks every feature in the hazard layer to make
sure that it is in fact a flood prone area. Hence, each feature must have an attribute
named AFFECTED.

● First, let’s add the new column to our layer.

● Still in the attribute table, click the “Toggle Editing” button.

● Click on the “New Column” icon.

● Type ‘affected’ as the name and select Text(string) for Type. Give 10 for the width.
Unit 4: QGIS and InaSAFE Intermediate Level | 29
● Click OK.

● Now select each value in the column “affected” and type “1”, instead of NULL.

● Click “Save Edits” and then “Toggle Editing” to stop your editing process.

Unit 4: QGIS and InaSAFE Intermediate Level | 30


6. Run InaSAFE

Everything is prepared now - our layers are loaded, the keywords are set, and we’ve
ensured that they layers have the data that InaSAFE expects. Time to click “Run”!

The results should looks something like this:

Save your project! We’ll be using it in the coming Modules...

We’ve run a few scenarios, but what is next? In the next Modules we will use our QGIS
skills to find the best evacuation routes for people to use in the case of the flood disaster,
as well as examining appropriate places for IDP camps.

Unit 4: QGIS and InaSAFE Intermediate Level | 31


Module 3
Determining IDP Camp Location

Learning Objectives
● Develop criteria for determining an ideal IDP camp location

Unit 4: QGIS and InaSAFE Intermediate Level | 32


● Using geoprocessing tools

● Using Spatial Query: Contains, Within, Equal, Intersect, and Is Disjoint

● Combine Geoprocessing Tools and Spatial Query to select building(s) for temporary IDP
camps

Another important part of disaster planning is determining potential locations for IDP
camps. To do this we need to be able to take various criteria into account in finding an
appropriate location. In Unit 2 we did exactly this. We analyzed various layers and
performed a GIS analysis to determine several land areas appropriate for IDP camps near
Merapi.

In this Module we will take a closer look at the tools we use to perform this GIS analysis,
but the process will remain the same. As with any proper GIS inquiry, we will follow
these steps:

1. Define the Problem

2. Obtain Data

3. Analyze Problem

4. Visualize Result

1. Geoprocessing Tools

When we performed our first analysis, we utilized several spatial functions in order to
answer questions such as “what locations match conditions in layer A and different
conditions in layer B?” Before we begin our GIS analysis, let’s examine the some of the
spatial functions that are available to us.

Buffer

The buffer function is used to make a new feature based on a given distance. We saw this
in Unit 2, when we defined a buffer around roads and health facilities. For example, we
created a 3km buffer around health facilities and created a new layer from this – these
defined areas which met one of our criteria – that camp locations should be close by.

Unit 4: QGIS and InaSAFE Intermediate Level | 33


Intersect

The intersect function is used to combine two overlapping layers, with the result that only
the intersecting features from both layers will be contained in the output layer. Attributes
from both layer features will be combined in the new layer.

Clip

Clip is used to cut an input feature with another feature (clip feature). The attributes from
input feature are left intact, only the shape of the input feature will follow the shape of the
clipping feature.

Union

Union is used to make a new feature by combining two features. The feature produced
contains features and attributes from the two sources features.

Dissolve

Dissolve is used to combine features inside layers that have the same value in one of their
fields.

Unit 4: QGIS and InaSAFE Intermediate Level | 34


2. Spatial Queries

Spatial Query is used to find the relationship between two features. The resulting value is
either TRUE or FALSE, unlike the geoprocessing functions above, which result in new
geometric features. Thus performing a Spatial Query is more like asking a yes or no
question. Various Spatial Query functions are covered here:

Within

Within is used to ask the question: ‘is feature A are fully located inside feature B?’ In the
image below, let’s assume the dark-colored circle is feature A and the light-colored circle
is feature B. We can use the Within function to ask the question, “Is feature A fully
within feature B?” The result would be TRUE. On the other hand, if we asked “Is
feature B fully within feature A?” the answer would of course be FALSE.

Contains

Contains is the opposite of Within. This function allows us to ask “Does feature A
contain feature B?”

Equal

Equal results in TRUE if two features have the same position and size. In the above
example, the result would be FALSE, because feature A and feature B do not have the
same size or the same position.

Unit 4: QGIS and InaSAFE Intermediate Level | 35


Intersect

Like the geoprocessing intersect tool we mentioned in the previous section, this spatial
query function evaluates whether two features are intersecting. If the features intersect,
this query will return TRUE.

Is Disjoint

This function is the opposite of Intersect, meaning that it will return TRUE if two features
are not touching one another. We might use this query if we want to search for buildings
that are located outside of an impacted disaster area. Because this function is the opposite
of Intersect, it would return FALSE if run on the example above.

Implementation of these functions is important in supporting analysis for scenario


development, specifically to obtain answers of typical questions such as:

● Which schools are safe from an earthquake?

● Which buildings can be used as temporary IDP camps?

● How many kilometers of national road will be lost in case of tsunami?

3. IDP Camp Criteria and Data

Now let’s get back to our Sirahan project. Throughout the rest of this Module, we will
once again apply our knowledge of geoprocessing tools and spatial queries in order to
identify an appropriate IDP camp location during a flood that is similar to the one in our
model. First, let’s list some criteria that we can use to determine the best location. Try to
think of your own list, and then see how it compares to ours below:

● Buildings/Houses that will be used as an evacuation site should be situated outside the
affected area (outside the flood zone)

● Location should have direct access to a primary road (jalan kabupaten) or secondary road
(Jalan Desa) with a maximum distance of 20 meters
Unit 4: QGIS and InaSAFE Intermediate Level | 36
● Building should have an area of at least 225 square meters

We’ve defined our problem, so the next step in the GIS process is to prepare our data. We
should have all the data ready from the previous Modules, but let’s make a quick list of
what data we must have in order to work with our criteria.

● Buildings/Houses

● Impacted area of flood

● Road network with road class attribute

Luckily, we have this data already prepared. The data you use might be different if you
have different criteria, or you have different needs and problems.

● Create a new project or edit your existing project so that it contains the following layers:
(the new layers are located in qgis/Sirahan/)

● Your map will look similar to this:

Unit 4: QGIS and InaSAFE Intermediate Level | 37


● Save your project as analisis_vektor.qgs and create a new folder with the name
analisis_vektor. As we run various geoprocessing tasks and output new layers, we will
save the new files in this directory.

4. Criteria #1: Building Must be Outside Affected Area

Okay, let’s work on our first criteria, that the building we choose as an IDP refuge should
be outside the affected area. Can you guess which type of spatial query we will perform?
Refer to the list of operations covered previously in this Module and guess which one fits.
If you guessed Is Disjoint, you are right! Is Disjoint let’s us search for features in one
layer that DO NOT touch features in another layer.

● Click on Vector > Spatial Query > Spatial Query

Unit 4: QGIS and InaSAFE Intermediate Level | 38


● Choose Bangunan_Sirahan as the input layer in “Select source features from.”

● Use the Is Disjoint operator and choose area_terdampak_Sirahan as the reference


feature.

● Click “Apply.”

● A window like image below will show, click “Close”

Unit 4: QGIS and InaSAFE Intermediate Level | 39


● The buildings outside of the affected flood areas will become selected:

● Select Bangunan_Sirahan.shp layer and save the selection as a new layer named
Bangunan_Sirahan_terpilih.shp and add it to the map.

● Remove the old buildings layer.

Unit 4: QGIS and InaSAFE Intermediate Level | 40


5. Criteria #2: Location Must Have Direct Access to a Primary/Secondary Road
within 20 meters

Now, we need to consider our second criteria, that the building chosen as an IDP refuge is
close to a main road. We used the same consideration with our example in Unit 2. Do
you remember how we can do this? First, we must use the Query Builder so that we are
only using the primary and secondary rules. Then we will use one of the Geoprocessing
Tools – Buffer!

● Right-click on the Jalan_Sirahan layer and click Filter.

● Create a query like this:

"tipe_jln" = 'Jalan Desa' OR "tipe_jln" = 'Jalan Kabupaten'

● Click “Test.” This will run the query and tell you how many features meet the conditions
in your query.

● You should see that our map shows fewer roads now, because we have filtered out those
that are not primary or secondary. Now that we have the roads, we will create a buffer
around them.

Unit 4: QGIS and InaSAFE Intermediate Level | 41


● Select the Jalan_Sirahan layer and go to Vector > Geoprocessing tools > Buffer(s):

● Set it up like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 42


● Save the layer as Jalan_Sirahan_buffer_20m.shp. Click OK and QGIS will create the
buffer, which will look like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 43


Now we have a layer which shows the areas that are within 20 meters of the primary and
secondary roads. The last thing to do in order to apply our criteria is determine which
buildings are situated withing the buffer. Hence we need to do another spatial query, this
time of type Within.

● Go to Vector > Spatial Query > Spatial Query.

● Fill in the fields to look like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 44


● Click “Apply.”

● The buildings that are within the roads buffer will be selected. Right-click on the
Bangunan_Sirahan_Terpilih layer and click “Save Selection As…” Save the selection
with the name Bangunan_Sirahan_buffer_20m.

6. Criteria #3: The building must have an area of at least 225 square meters.

Our final criteria is that the building we choose should have an area of at least 225 square
meters. With an area this size, the building will be able to serve as an IDP camp for the
residents of Sirahan whose homes are affected by the flood.

● Right-click on the Bangunan_Sirahan_buffer_20m layer and choose Filter.

● Enter the following query for the layer:

"way_area" >= 225

● Click “Test.” The query should return only a handful of features.

Unit 4: QGIS and InaSAFE Intermediate Level | 45


● Take a closer look at the remaining buildings. You can inspect the features of each
individually by using the “Identify Features” tool.

● In the very south tip of Sirahan you should find a building that is identified as a hospital.
This building is, in fact, a real world hospital, and it is an actual IDP camp. Compare it
with your result. This should be one of the buildings that your analysis deems suitable as
a camp, and when you consider that it is also a hospital, it clearly makes a good location.

In this Module we reviewed the various Geoprocessing tools and the spatial queries, and
we used some of them to analyze our problem – where should we put an IDP camp. This
is yet another key component of contingency planning, and luckily it’s not too difficult to
perform with the right knowledge of GIS.

Unit 4: QGIS and InaSAFE Intermediate Level | 46


Module 4
Planning Evacuation Route Based on
Hazard Information

Learning Objectives
● Explain the concept of shortest path and fastest route

● Using Road Graph plugin

● Set up speed and road direction

● Determine start and destination point

● Conduct route analysis and selection

By now you should have a pretty good understanding of how InaSAFE works and its
operations. You know how to add the appropriate layers, and how to define keywords to
the layers so that InaSAFE can recognize them appropriately. Now that we can use
InaSAFE effectively to run scenario analyses, we will look at other QGIS functionality
that will help us in preparing contingency plans. In this Module, we will learn how to
perform a GIS analysis in order to determine an appropriate evacuation route in the event
of a disaster.

The term fastest route indicates the route a person can take between point A and point B
that will allow them to cover the distance in the least amount of time. Similarly, shortest
path indicates the route that will allow a person to get from point A to point B with the
least distance traveled. In theory, this would be a straight line between point A and point
B, but in reality this is impractical, because traveling in a straight lines means climbing
hills and going around buildings and fences. Of course this is why we use roads, and why
we calculate fastest and shortest routes using roads. We will use the Road Graph plugin
in this Module, which does just that. If we provide two points, the plugin is able to
calculate either the fastest route or the shortest path between them.

1. Road Graph Plugin

● We will be continuing with the previous example, which you should have saved. Open
the project in QGIS. We won’t be using the InaSAFE plugin in this Module, so you may
close the panel if you like.
Unit 4: QGIS and InaSAFE Intermediate Level | 47
● Also, we will be using a pre-prepared roads layer in this section, which may be slightly
more detailed than OpenStreetMap. Remove the planet_osm_roads layer and add
Jalan_Sirahan, which is located in the qgis/Sirahan/ directory. You should have the
following layers:

● We will be using a plugin that has already come installed with QGIS. Right-click on the
toolbars to see which toolbars are activated, and select “Shortest path.”

Unit 4: QGIS and InaSAFE Intermediate Level | 48


● A new plugin window will appear in your project window that looks like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 49


2. Edit Plugin Settings

● We must edit some settings in order for the “Shortest path” plugin to work. Go to Vector
> Road graph > Settings.

Unit 4: QGIS and InaSAFE Intermediate Level | 50


● Make sure that “hour” and “kilometer” are selected as the units.

● “Topology tolerance” should be set to 4.

● On the “Transportation layer” tab, select Jalan_Sirahan as the layer. This layer contains
the streets that the plugin will use to calculate routes. The rest will remain the same. It
should look like this:

● On the “Default settings” tab, we must fill in the direction and speed. Choose “two-way
direction” and 25 for the speed (meaning 25 km/hr). This assumes that traffic can go in
both directions and a maximum speed of 25 km/hr.
Unit 4: QGIS and InaSAFE Intermediate Level | 51
● Click OK.

3. Choose Start and Destination Points

The Road Graph plugin calculates either the shortest or fastest route between two points,
so we need to provide a start point and an end point for an evacuation route. Of course an
evacuation route should be for all people in an area, but we can experiment with different
start points and see if evacuation routes will be different in different areas.

● On the Road Graph panel, click on the plus button next to “Start” and then click
somewhere on the map to indicate the first point of your evacuation route. This would be
the initial point for the evacuation route in the time of a disaster.

● Your starting point will be marked as a green point and the coordinates of the point will
be recorded in the “Start” input box.

● Now we need to assign the destination of our evacuation route. Where will people be
evacuated to? Because this is an example, we don’t have a great idea of where an
appropriate place would be. We might use GIS to determine appropriate locations, which
would most likely be high ground in the event of a flood. For this example, we will
choose a destination at the SouthEast corner of the village.

Unit 4: QGIS and InaSAFE Intermediate Level | 52


● Click the plus sign next to “Stop” and click somewhere on the map. The destination will
be marked with a red point.

● You can choose “Length” or “Time” next to Criterion. This determines whether Road
Graph will look for shortest distance or shortest amount of time.

● Click “Calculate.”

● The time and distance required for the evacuation route will be displayed.

● In this example, the length of the fastest route between our two points is about 1.97
kilometers and the travel time is 0.0788 hours, which is about 5 minutes. This time in our
example is determined by the distance and our default speed of 25 km/hr. This speed can
be changed, and can even be set to different amount for each segment of road.

● The route is also drawn on our map

● To save the evacuation route as a separate layer, click on Export > New temporary layer,
and click OK.

Unit 4: QGIS and InaSAFE Intermediate Level | 53


● You may need to choose a CRS for the new layer. UTM zone 49S should work fine.

● The layer will be added to your Layers list as shortest_path, but you still need to save the
layer.

● To save, right-click on the layer and click “Save as…”

In this chaper we’ve learned how to calculate the shortest distance between two points
using the Road Graph plugin. Using this you can easily determine evacuation routes
from various areas. Evacuation routes are important for contingency plans, and those
living in threatened areas can be educated with the quickest and safest routes to take in
the event of an emergency.

Module 5
Unit 4: QGIS and InaSAFE Intermediate Level | 54
Calculating Damage and Losses

Learning Objectives
● Explain the definition of damages, losses, and their calculation based on exposure data
from OSM/community participation which is impacted by disasters

● Explain damage and losses assessment values based on BNPB and BPBD

● Making damage and losses map

● Calculate damage area

● Manipulate attributes data of affected features to obtain damage values for each object

● Manipulate attributes data of affected features to obtain losses values for each object

● Grouping attributes data for each administration area (hamlet, village, subdistrict)

● Join attribute data for each administration area (hamlet, village, subdistrict)

● Present damages and losses value using charts

A Damage and Loss Assessment (DaLA) is usually created after after a disaster. The
standard DaLA methodology was developed by the UN Economic Commission for Latin
America and the Caribbean (UN-ECLAC) in 1972, and has evolved with various
international organizations since. Simply, it is a methodology for approximating damage
and losses due to a disaster, basing calculations on a country’s economy and individual
livelihoods to define the needs for recovery and reconstruction.

A Damage and Loss Assessment includes the following:

● Damage calculated as the replacement value of totally or partially destroyed physical


assets;

● Losses in the flows of economy that arise from the temporary absence of the damaged
assets;

● The resultant impact on post-disaster macroeconomic performance, with special reference


to economic growth/GDP, the balance of payments and fiscal situation of the
Government.1

1 Source:https://www.gfdrr.org/gfdrr/Track-III-TA-Tools

Unit 4: QGIS and InaSAFE Intermediate Level | 55


In this Module we will learn how to calculate some of the basic data used in a DaLA, and
use various QGIS functions to design a thematic map that shows damage and loss.

1. BPBD Damage Assessment Guide

The BPBD has created a guide for damage and loss assessment for Indonesia, which
defines varying degrees of damage and the economic impact of individual elements.
Parts of this definition are shown here:

These are the guidelines for Damage & Loss Assessment.

Notice that there are several elements at work here. First, damage to different types of
infrastructure is “valued” differently. To put losses into monetary terms, a the loss of a
bridge has a loss value as does the loss of a public building or a private home. Then,
Unit 4: QGIS and InaSAFE Intermediate Level | 56
depending on whether a feature suffers heavy, medium, or low damage, a multiplier is
applied to determine the value of the loss.

By adding up all of the damage it is possible to assess the total damages caused by a
disaster. In the remainder of this Module, we will calculate the value of the losses in our
Sirahan project, and see how we can display them graphically using our map, based on
the damage suffered in each hamlet.

2. Damage and Losses Assessment Map

We will create a Damage and Loss Assessment Map using our data from Sirahan Village
that we have been working with throughout this unit.

● Open QGIS and make sure that the following layers are loaded into your project:

○ area_terdampak_Sirahan

○ Jalan_Sirahan

○ Sungai_Sirahan

○ Batas_Desa_Sirahan

○ Bangunan_Sirahan

Unit 4: QGIS and InaSAFE Intermediate Level | 57


We will assume that all the buildings in the area_terdampak_Sirahan layer (hazard zone)
suffered heavy damage from the disaster. Let’s create a spatial query to filter out these
buildings.

● Go to Vector > Spatial Query > Spatial Query and enter the fields like this:

● We now have a bunch of buildings selected which we are assuming will suffer heavy
damages. According to the BNPB Guide, we can assess the loss of heavily damaged
buildings at a rate of 1.8million Rp. / square meter, and the multiplier factor is 70%. Our
formula for calculating losses is:

Total Building area x Loss Value per m² x Multiplier factor

● Therefore we want to calculate:

Total Building Area x 1.8 million Rp. x 70%

in order to get a calculation of the value of total losses.

Unit 4: QGIS and InaSAFE Intermediate Level | 58


● We will use the Intersect Geoprocessing tool so that we can combine attributes from our
district layer with the selection of buildings we have just made. Go to Vector >
Geoprocessing Tools > Intersect and fill in the fields as follows:

● Save the result as Bangunan_Terdampak

● Hide the original buildings layer so that your map looks like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 59


● Then, we need to intersect bangunan_terdampak.shp layer with Batas_Desa_Sirahan
layer so our attribute table will include the DUSUN attribute. Give the new layer name
with bangunan_terdampak_perdusun.shp

Unit 4: QGIS and InaSAFE Intermediate Level | 60


3. Calculate Damage Area

● On the attribute table of Bangunan_Terdampak_perDusun, click the “Toggle Editing”


button.

● Then click the “New Column” button.

● Create a new column named “Damage” of type decimal number:

● To calculate the damaged area of affected buildings we will use the field calculator to
determine the number of square meters in each building feature. Click on “Field
Calculator.”

● Check the box next to “Update existing field” and select “Damage_Area” in the
dropdown box.

● Find “$area” under Geometry in the function list and double-click on it, so that it appears
in the Expression box at the bottom. It should look like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 61


● Click OK. You will see that the column is filled in with the area, in square meters, of the
buildings.

● Click the “Toggle Editing” button and be sure to save your edits.

Unit 4: QGIS and InaSAFE Intermediate Level | 62


4. Calculate Damages Using “Group Stats” Plugin

We will be using a QGIS plugin called Group Stats in order to calculate damages by each
hamlet within Sirahan. You will need to be connected to the internet to install this
plugin.

● Go to Plugins > Manage and Install Plugins

● Go to “Get more” tab, type “group stats” and when you find the plugin, select it and click
“Install plugin.”

● Once it is installed, you will find Group Stat on your Toolbar. Click it.

● Then, Group Stats window will shows up.

● To calculate building damages per hamlet, in layers, select:


Bangunan_Terdampak_perDusun

● Find Dusun on the field list, then drag and drop to Rows

● Find Damage and sum on the field list, then drag and drop to Value

● Click on “Calculate.” The results should look like this:

Unit 4: QGIS and InaSAFE Intermediate Level | 63


● Click Data > Save all to CSV file and save it as BNG_Damages.

5. Calculate Losses

Now we’ve calculated the damaged area and we’ve created a table with damage data for
various hamlets in Sirahan. Now let’s implement our losses formula in the same way.

● Go back to the attribute table for Bangunan_Terdampak_perDusun and add a new


column named “Losses.”

Unit 4: QGIS and InaSAFE Intermediate Level | 64


● Once again, open the Field Calculator.

● Check “Update existing field” and choose “Losses”

● At the bottom in the Expression box, enter the following formula:

“Damage” * 1800000 * 0.7

Unit 4: QGIS and InaSAFE Intermediate Level | 65


● Your new column is now filled with information calculated from this formula, which
assesses the value of losses in Rp for each individual building. Save the layer and end the
editing session.

6. Calculating Losses Using “Group Stats” Plugin

Now let’s calculate losses per hamlet using Group Stats again.

● Open Group Stat window. Then select bangunan_terdampak_perdusun layer

● Click “Clear” to start new analysis

● Find DUSUN on the field list, then drag and drop to Rows

● Find Losses and sum on the field list, then drag and drop to Values

Unit 4: QGIS and InaSAFE Intermediate Level | 66


● Click “Calculate.”

● The new table shows the losses in each hamlet.

● Click Data then click Save all to CSV files as BNG_Losses.

7. Join Data

Now we will join the tables that we created to our Batas_Desa_Sirahan attribute table
and then use them to add new columns to the file.

● Add the files BNG_Damages and BNG_Losses into QGIS, using “Add vector layer”.
Make sure you click on file type as CSV, otherwise, the CSV file won’t shows up.

Unit 4: QGIS and InaSAFE Intermediate Level | 67


● They will appear in your Layers list but not on your map, because they are not
geographic data files, but rather tables.

● Now we will perform an operation to join the layer Batas_Desa_Sirahan with


BNG_Damage. Right click on the Batas_Desa_Sirahan layer and go to
Properties.

Unit 4: QGIS and InaSAFE Intermediate Level | 68


● Go to the Joins tab:

● Click the plus sign and fill in the following fields:

○ Join layer : BNG_Damages

○ Join field: DUSUN

○ Target field : DUSUN

Unit 4: QGIS and InaSAFE Intermediate Level | 69


● Click OK.

● Click the plus sign again and fill in the following fields:

○ Join layer : BNG_Losses

○ Join field: DUSUN

○ Target field : DUSUN

● Click OK

● Close layer properties, now open the attribute tables for Batas_Desa_Sirahan
layer. You will see that BNG_Damages and BNG_Losses column now
attached based on its hamlet.

 Remember that we won’t have BNG_Damages and BNG_Losses column


permanently because it’s being saved on our virtual memory. So, we need to
save it as a new layer. Close the attribute table, right-click
Batas_Desa_Sirahan layer, and click Save as. Give the new layer name
analisis_dala_Sirahan.shp
 We need to convert the BNG_Damages and BNG_Losses column on our new
layer as real number. To do this open attribute table for
analisis_dala_Sirahan. Click toggle editing mode and open Field Calculator.
 This time, we will create a new field. Enter the new field name: Damages,
with output field as decimal number (real). Field width 20 and Precision 10.

Unit 4: QGIS and InaSAFE Intermediate Level | 70


Under Fields and Values, double click BNG_Damage. Our setting now should
look like this.

 Click OK.
 Now, we will create another new field for Losses. Enter the new field name:
Losses, with output field as decimal number (real). Field width 20 and
Precision 10. Under Fields and Values, double click BNG_Losses. Click OK.
 Exit editing mode and save your changes.

8. Create a Chart

Now we will conclude by representing these damage and loss values as a chart in
QGIS.

● Go the the properties for the analisis_dala_Sirahan layer and go to the


Diagram tab.

● Check the box next to “Display diagrams.”


Unit 4: QGIS and InaSAFE Intermediate Level | 71
● Make sure “Pie chart” is selected in the dropdown.

● On Available attributes, select Damages then click plus (+) sign

● You can change the color by double-clicking the color on the Assigned
attribute column. Our setting should look like this

● Go to the size tab

● Disabled the fixed value, and then click “Find Maximum Value.” Change the
scale into Area.

● You also can change the size for example 35 if you feel the diagram is too big.

Unit 4: QGIS and InaSAFE Intermediate Level | 72


● Select OK, then your map will look like this:

The size of each bubble represents the loss values in each hamlet. The bigger the size, the
heavier the losses. Creating a map with this sort of chart can be an effective way to
communicate the impact of a disaster. Now you can layout your map, then try to create
another map with diagram showing Losses.

In this Module we have learned about methodology for evaluating losses, and we have
learned how to calculate this in QGIS. We also learned how to export tables, join them
with shapefiles, and overlay charts on top of our map.

73

Unit 4: QGIS and InaSAFE Intermediate Level | 73

Вам также может понравиться