16
( 77 ) Integrating Web GIS Technology and 2D Inundation Model to Develop an Inundation Simulation System 整合Web GIS技術與二維淹水模式研發 淹水模擬展示系統 XUAN-ANG LI Shan-Shui Technical Consultant Co. Ltd, Civil Engineer SHIU-SHIN LIN* Department of Civil Engineering Chung Yuan Christian University, Associate Professor JHENG-HUA SUNG Department of Civil Engineering Chung Yuan Christian University, Master JIHN-SUNG LAI Hydrotech Research Institute National Taiwan University, Researcher ABSTRACT This research integrates web geographic information system (GIS) technology and the two-dimensional inundation model (2DIM) to develop an inundation simulation system (ISS). ISS employs the Apache web server, MapServer, HTML (Hyper Text Markup Language), CSS (Cascading Style Sheets), JavaScript, and PHP programming languages to develop online, user interfaces allowing users to input rainfall data directly from their browsers. ISS then simulates inundation and transforms the simulated results into spatial information. The results can be shown on the web using MapServer, web GIS technology. The process of simulation is simplified by running 2DIM automatically instead of manually. Luzhou and Sanchong Districts in New Taipei City are selected in this research to test the ISS during system development and test phases. ISS chooses a single rainfall event for each case to simulate inundation, and transforms the simulated results to spatial information. The simulated results are compared with those simulated manually in a step by step approach, and then ISS displays the simulated results using ArcGIS software. Results show that that ISS is feasible and can be applied to execute 2DIM, and to display geospatial data online. This reduces the complexity of simulation to efficiently reach the objective of real-time simulation. Keywords: Online simulation, Two-dimensional inundation model, Web GIS, MapServer, Spatial inundation information. 本研究整合網路地理資訊系統(Web Geographic Information System, Web GIS)展示技 術與二維淹水模式(Two Dimensional Inundation Model, 2DIM),研發淹水模擬展示系統 (Inundation Simulation System, ISS)。使用Apache網頁伺服器、MapServer網頁地圖伺服器、 網頁語言HTML (Hyper Text Markup Language)CSS (Cascading Style Sheets)JavaScript*Corresponding author: Associate Professor/ Department of Civil Engineering, Chung Yuan Christian University/ 200 Chung Pei Road, Chung Li District, Taoyuan City, Taiwan./ [email protected] 臺灣水利 67 4 民國 108 12 月出版 Taiwan Water Conservancy Vol. 67, No. 4, December 2019

Integrating Web GIS Technology and 2D Inundation Model to

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Integrating Web GIS Technology and 2D Inundation Model to

( 77 )

Integrating Web GIS Technology and 2D Inundation Model to Develop an Inundation Simulation System

整合Web GIS技術與二維淹水模式研發 淹水模擬展示系統

XUAN-ANG LI

李 軒 昂Shan-Shui Technical

Consultant Co. Ltd,

Civil Engineer

SHIU-SHIN LIN*

林 旭 信Department of Civil

Engineering Chung Yuan

Christian University,

Associate Professor

JHENG-HUA SUNG

宋 政 樺Department of Civil

Engineering Chung Yuan

Christian University,

Master

JIHN-SUNG LAI

賴 進 松Hydrotech Research Institute

National Taiwan University,

Researcher

ABSTRACT

This research integrates web geographic information system (GIS) technology and the two-dimensional inundation model (2DIM) to develop an inundation simulation system (ISS). ISS employs the Apache web server, MapServer, HTML (Hyper Text Markup Language), CSS (Cascading Style Sheets), JavaScript, and PHP programming languages to develop online, user interfaces allowing users to input rainfall data directly from their browsers. ISS then simulates inundation and transforms the simulated results into spatial information. The results can be shown on the web using MapServer, web GIS technology. The process of simulation is simplified by running 2DIM automatically instead of manually. Luzhou and Sanchong Districts in New Taipei City are selected in this research to test the ISS during system development and test phases. ISS chooses a single rainfall event for each case to simulate inundation, and transforms the simulated results to spatial information. The simulated results are compared with those simulated manually in a step by step approach, and then ISS displays the simulated results using ArcGIS software. Results show that that ISS is feasible and can be applied to execute 2DIM, and to display geospatial data online. This reduces the complexity of simulation to efficiently reach the objective of real-time simulation.

Keywords: Online simulation, Two-dimensional inundation model, Web GIS, MapServer, Spatial inundation information.

摘     要

本研究整合網路地理資訊系統(Web Geographic Information System, Web GIS)展示技術與二維淹水模式(Two Dimensional Inundation Model, 2DIM),研發淹水模擬展示系統(Inundation Simulation System, ISS)。使用Apache網頁伺服器、MapServer網頁地圖伺服器、網頁語言HTML (Hyper Text Markup Language)、CSS (Cascading Style Sheets)、JavaScript和

* Corresponding author: Associate Professor/ Department of Civil Engineering, Chung Yuan Christian University/ 200 Chung Pei Road, Chung Li District, Taoyuan City, Taiwan./ [email protected]

臺灣水利 第 67 卷 第 4 期

民國 108 年 12 月出版

Taiwan Water ConservancyVol. 67, No. 4, December 2019

Page 2: Integrating Web GIS Technology and 2D Inundation Model to

( 78 )

1. INTRODUCTION

Taiwan is located, climatically, at the junction

of tropical and subtropical regions affected by

monsoons so that rainfall is unevenly distributed.

Moreover, due to Taiwan’s narrow land shape, short

rivers, and narrow areas, in summer and autumn

afternoons during thundershowers, typhoons, and

high-intensity and concentrated rainstorms; the

heavy rainfalls produced within a short time cannot

be discharged and thus the consequent inundations

cause losses to people’s lives and properties. In

order to reduce the number of disasters resulting

from inundations, many flood control facilities have been built for dams, urban drainage systems, and

dikes. But due to climate change, extreme rainfalls

exceeding historical records of precipitation

happen repeatedly, and repeatedly challenge the

flood control capacities of project facilities. In

recent years, in the fields of hydrology and disaster prevention, many have considered promoting and

integrating inundation simulation techniques by:

using information assistance systems for flood

avoidance as the orientation of flood and disaster

prevention; evaluating regional potential inundations

with historical inundation records to strengthen

disaster prevention resources and pre-disaster

preparation in regions with high-disaster potential;

or applying disaster prevention science, based on

inundation simulation warning technology, to assist

in decision making and improve flexibility when

disasters happen.

At present, there are many international and

Taiwan inundation models (WL|Delft Hydraulics,

1995; US Army Corps of Engineers, 1990; Lai,

1986; Chung et al., 1980; Savage et al., 2016; Teng

et al., 2017). Most of these inundation models are

commercial packages that simulate the surface water

flows of the rainfall area to acquire the inundation depth of all places. In the past, a non-commercial

software package developed by the Hydrotech

Research Institute at the National Taiwan University,

the two-dimensional inundation model (2DIM), has

been widely used to evaluate inundation simulation

and potential disasters in urban areas (Guidolin et

al., 2016). However, 2DIM is written in the Fortran

programming language which has no graphical

user interface (GUI). Because of this, configuring

simulation parameters with complex models and

setting the initial and boundary conditions, all

depend on professionals’ knowledge and experience.

This can often be completed through the assistance

of other commercial software, which is time

consuming to simulate the leading operation (Chang

et al., 2013). The simulated inundation results

then require additional manual processing to be

graphically displayed. Yet, 2DIM is not designed

to be a network service component, which is

inconvenient for real-time warning systems (Lin et

al., 2004; Lin et al., 2010; Lin et al., 2014).

If the inundation model can be ran in a network

service mode, the simulated inundation results

will be integrated and displayed in a geographic

information system (GIS), which will be helpful

for a real-time disaster warning system. In the past,

the data were organized in the form of maps after

PHP語言開發線上使用者操作介面,可經由網頁瀏覽器加入即時降雨事件資料後直接進行都市地區淹水模擬,將模擬結果轉換為空間資訊展示,簡化二維淹水模式在進行模擬前需要由人工進行複雜的操作流程。研究中選用過去以二維淹水模式進行淹水模擬之案例:新北市蘆洲及三重區降雨事件作為系統開發、測試案例,將ISS線上即時模擬之淹水空間資訊,與過去在單機下操作二維淹水模式搭配地理資訊系統商業軟體(ArcGIS)展示之淹水空間資訊進行結果比較,兩者呈現相同的淹水結果,說明以ISS進行線上模擬並展示淹水資訊之可行性,達到簡化二維淹水模式操作及即時展示淹水空間資訊的目的。

關鍵詞: 線上模擬,二維淹水模式,Web GIS,MapServer,淹水空間資訊。

Page 3: Integrating Web GIS Technology and 2D Inundation Model to

( 79 )

mostly being processed with singly operated GIS,

and then displayed on the information platform.

A series of manual operation process tests tested

the immediacy required for warning systems,

but the GIS system had various functions, was

hard to operate, and thus a vast amount of time

was consumed during its operation. As network

technology has developed rapidly in recent years,

Web GIS combined with the internet has been

developed and used to solve these problems. For

instance, having the advantages of a cross-operating

system with multiple programming language

compatibility, MapServer, the open source software

developed in 1990 by the University of Minnesota

in the United States, has long been applied to—

and integrated in—the fields of inundation and

disaster prevention. Tsai (2009) integrated a real-

time sewer simulation (RTSS) with MapServer

for urban internal water warning. Tsai (2009) then

developed an urban sewer warning system (USWS),

and carried out real-time simulative calculations

on rainfall data to study whether the manholes of

several pump station systems were full, and then

displayed the results on the system webpages. Lin

et al. (2014) integrated an adaptive network-based

fuzzy inference system (ANFIS) with MapServer

for sewer stage forecasting, and developed ANFIS

for a sewer stage forecasting system (ASFS),

demonstrating that the forecasting system had good

results in 5 and 10-minute advanced forecasting.

Moreover, these integration research results also

indicate that the combination of internet and Web

GIS is indispensable in the fields of inundation and disaster prevention.

The main purposes of this research are to

combine the inundation simulation model with

internet and Web GIS technology for an inundation

simulation system equipped with online real-time

simulation and display functions; to simplify the

manual operation process used in past inundation

simulations; and to discuss the structural designs

of a comprehensive warning system under

development, so as to enhance the capabilities of

inundation simulation warning technology and the

feasibility of combining with it new technologies.

2. STRUCTURE OF THE INUNDATION SIMULATION SYSTEM

2.1 Two-dimensional inundation model

The two-dimensional inundat ion zero-

inertia model (hereinafter referred to as the two-

dimensional inundation model) used in this research

was developed by the Hydrotech Research Institute

at the National Taiwan University (Lai, 1986).

Assuming that in an unsteady flow equation,

acceleration is much less than gravity (or friction)

and the flood hydrograph of the water flowing into the flooded area increases slowly; and by ignoring the effects of the Coriolis force, the wind force and

the velocity component in the vertical direction,

the phenomenon of flood wave transmission can

be described by using a zero-inertia model with

acceleration ignored. The equations are as follows:

(1)

(2)

(3)

where, x and y mark the space coordinates of

the simulation area, t is the time coordinate and

d is the depth of water, u and v are the average

flow velocities respectively in x and y direction,

nx is Manning's roughness in x direction and ny is

Manning's roughness in y direction, h is the water

level, g is the gravitational acceleration and q is

the lateral flow, rainfall intensity, extraction and

infiltration rate of unit surface area. The above

Equation (1) is a continuity equation, and Equations

(2) and (3) are the motion equations respectively

( ) ( )q

y

d

x

d

t

d=

∂∂

+∂

∂+

∂∂ vu

⋅+=

∂∂

−g

u

d

q

d

nu

x

h x

34

2

⋅+=

∂∂

−g

v

d

q

d

nu

y

h y

34

2

Page 4: Integrating Web GIS Technology and 2D Inundation Model to

( 80 )

in x and y direction. When the geographical

parameters, such as terrain elevation, Manning's

roughness (nx, ny), and lateral flow (q), are known,

only 3 unknown variables remain in the 3 equations

above: the inundation depth (d), and the average

flow velocities (u, v) in the directions of both axes.

Assuming that there is no water on the surface in the

research area at the initial moment, the flood wave will flow into the flood plain after overflowing or

inundation accumulation; the boundary arising from

the junction of land and water must be formed in a

downstream location, and this boundary will move

downstream over time. The alternating direction

explicit (ADE) numerical method is used to solve

the above equations to simulate the inundation

results (Lai, 1986) that included the moving

boundary condition with its quite complex physical

phenomenon.

For inundation simulation, it is required to

manually perform the following series of steps with

the original two-dimensional inundation model.

(1) Prepare input data: inflow data are optional and saved as text files (.txt). Topographic data:

the data are saved as a digital elevation model

(DEM) which is the numerical model describing the

natural surface elevation. Boundary data: similarly,

the boundary properties are saved as a DEM.

The first column shows the names of the record

fields in sequence X, Y, and Z. In each record,

the X-coordinate value of the 2-degree zone, the

Y-coordinate value of the 2-degree zone, and the

Z-value of the boundary water level elevation (if no

boundary water level, then used elevation) for each

grid point are saved. In this way, coordinates and

property data of all grid points are recorded in order

and separated by commas. Rainfall data: quantity

of rainfall stations, X and Y coordinate values of

the 2-degree zone (TWD97) of all rainfall stations

and hourly precipitation are recorded. Inflow data: not necessary for conducting the two-dimensional

inundation model; data are to be recorded in the

rainfall data record format (e.g., the quantity of

rainfall stations, hourly inflow data, as well as X and Y coordinate flow data of the 2-degree zones for all hydrologic stations).

(2) Set file paths and define simulation

environment parameters: after the data are entered

and verified, the files will be saved in the same

directory as the two-dimensional inundation model.

The actions to be executed by batch files (.bat) in

the next step are set according to file names. Batch file is a text format file, with the purpose of telling the system to execute multiple files in batches or in the same time according to the file.

(3) Execute batch files and establish simulation environment: Execute the set batch files in the above step, and read and analyze the input files to acquire the simulation parameters such as rainfall duration

set as above. After this, establish a case directory.

The directory is to include the input data required

for calculation of the two-dimensional inundation

model.

(4) Execute main program of the two-

dimensional inundation model and obtain simulation

results: With access to the directory (produced

in the above step), the main program of the two-

dimensional inundation model can be executed for

calculation, upon completion of which, inundation

data files will be produced.(5) Convert simulation results into DEM

data: after getting the inundation data, execute the

conversion program in the directory. Convert the

data into the inundation information files which are two-dimensional matrix data separated by commas

in the DEM file format. The first column shows the names of the record fields in the following sequence: X-coordinate value of the 2-degree zone coordinate

system; Y-coordinate value of the 2-degree zone;

inundation depth D (m); and Z value of elevation

(m). The second and subsequent columns record the

coordinates and properties of all grid points.

2.2 Web GIS display technology

As a computer system which can calculate,

Page 5: Integrating Web GIS Technology and 2D Inundation Model to

( 81 )

save, inquire, analyze, and display geographic

data, the GIS has spanned half a century since its

development began in the 1960s. Established in

1994, the Open GIS Consortium (OGC) formulated

the common standards for GIS development,

namely Open Geodata Interoperability Specification (Open GIS or OGIS), and thus solved the problems

of complex data and no communication among

all platforms due to each t independent, early

stage platform development. At this point in

the development history, GIS starts to expand

and is widely applied to all fields (http://www.

opengeospatial.org).

In addition to function, data transmission rates

and user convenience should also be considered

in technology development. Unlike the previous

multifunctional and complex standalone version of

GIS system, Web GIS combined with the internet

is extensively used in all fields. This is because

it focuses on data format conversion as well as

common function inquiry and display, and is quite

a suitable tool for displaying spatial information.

Common Web GISs include ArcGIS API developed

by ESRI, TIGER (Topologically Integrated

Geographic Encoding and Referencing) developed

by the United States Census Bureau, and MapServer

owned by the Open Source Geospatial Foundation

(OSGeo).

The data used by GIS are called geospatial

data. It describes spatial characteristics and attribute

relationships, and describes the spatial information

that features constituted by three-dimensional

geometric objects of dots, lines, and planes convey.

The common digital data formats are computer

aided design (CAD) files (e.g., DXF, DWG and

DGN, KML files developed by Google for Google products, and Shapefile developed by ESRI). A

vector file format, Shapefile is the open standard

between kinds of geographic information software,

and can be used for almost all GIS software. A

complete Shapefile must contain at least geometry

entities (.shp), geometric entity indexes (.shx),

and attribute data (.dbf) to constitute complete

spatial information for GIS to read and to use.

Considering the system development combined

with the previously developed warning system, this

research adopts this file format to establish spatial

information as well.

2.3 MapServer

Developed by the University of Minnesota

in the United States in 1990, MapServer can be

operated in all mainstream operation systems

(Windows, Linux, Mac OS X) and is developed

in multiple languages. Those widely used are

Perl, Python, PHP, etc., and good API is provided

for many independent developers to easily use

MapServer to develop geographic information

display platforms. As open source software, it

has been certified by OSGeo and is now jointly

maintained and continuously updated by developers

and users around the world. (http://mapserver.org/)

MapServer communicates between webpage,

web server, GD library and other programs with

common gateway interface (CGI) to achieve

interaction with users. As a standard interface

program, CGI can enable web pages to communicate

with the web server to interact with users. Moreover,

through CGI program, web pages can be produced

dynamically to show the latest data on the server.

Users do not need to download or install any plug-

in or program but only send requests to the server

through operations on web browsers, and MapServer

will respond to demands, capture data from the

locations where spatial information is saved, and

call GD Library, and then convert the data to graphic

information and post back to the browsers to display

for users.

To achieve an online display of spatial

inundation information, MapServer has four

necessary files: start webpage, spatial information

file, map definition file, and HTML template

file. Figure 1 shows the operation procedures of

MapSever. 1) Firstly, the users use a browser to enter

Page 6: Integrating Web GIS Technology and 2D Inundation Model to

( 82 )

the website display platform; 2) The start webpage

sends parameters to the web server to request for

spatial information, and after receiving the requests,

the web server calls MapServer CGI to take actions;

3) At this time, definitions and parameters of the

spatial information contained in the map definition file are captured; 4) The parameters set in the map definition file are forwarded to the locations where the spatial information is saved; 5) The spatial

information needed (i.e., the shapefile) is captured; 6) Next, GD Library is called to produce the graphic

information; 7) HTML template file is reread to

verify the way to present the graphic information

and spatial information; 8) Lastly, the graphic

information is transmitted through the web server to

present on the users’ browser.

After being called by the Controller, MapServer

will look for the four necessary files mentioned

above, under the specified paths in the system, to

correctly display the spatial information. The four

necessary files are described as follows:a. Start webpage (Index.html): mainly used to start

MapServer CGI and transmit basic parameters

such as dimensions, layers, and relative paths of

all linked files.b. Spatial information file (Shapefile): the spatial

information files converted by the Controller are to be read and displayed by MapServer. In the

research, the spatial information files are produced at the interval of every 0.2 m of the inundation

depth, and after being read by MapServer, the

files are displayed as overlaid layers in browsers for users to view. In this research, the webpage

start will call 10 spatial information files in total named Layer_Catchment, Layer_xydz_0, Layer_

xydz_1, etc. These layers are the catchment area

layer; the location at inundation depth 0.0 m

layer; the location at inundation depth 0.0 m‒0.2 m layer. By analogy, the latter is the location at

inundation depth greater than 1.4 m layer.

c. Map definition file (.map): the map definition

files are MapServer-defined formats. After

being started, MapServer CGI analyzes the map

definition files of this event. The files starting

with the tag, ‘MAP’ indicate that they are map

definition files, and the last lines ending with,

‘END’ indicate that the tag ‘MAP’ is ended. Users

can define basic parameters of maps, such as

upper and lower bounds, dimensions, file formats, map tag design, etc.

d. HTML template file: MapServer is displayed on browser pages, and after MapServer captures

the above data, the results are represented in the

users’ web browsers according to the template

files. On the right side of the image, the template files show the webpage image and the control

panel for design layer opening / closing, zooming,

panning, and other operations. The template files are interpreted by MapServer CGI and the syntax

is based on the HTML structure. The description:

<!-- MapServer Template -->, must be added in

the first line of the script. This informs MapServer that these are the webpage display template files, and enables the template files and the start web

pages to transmit related spatial information

Fig. 1. MapServer operation procedures.

Page 7: Integrating Web GIS Technology and 2D Inundation Model to

( 83 )

parameters to each other.

2.4 Integrated design of the inundation simulation

system

Figure 2 is an integrated simulation system

(ISS) architecture diagram that includes the web

server, Controller, 2D inundation model, GIS

MapServer, and Database components. Users

can make requests to the server with the internet,

which the web server then transmits the relevant

information to the Controller components to

process accordingly. For instance, if users aim

to conduct an inundation simulation, firstly, the

web server can be used to transmit relevant input

information to the Controller components, and

then a 2D inundation model can be called by

the Controller components for an online two-

dimensional inundation simulation. After simulation

calculations are complete, the simulated inundation

results are transmitted to the Controller components

to be saved in the Database, and to make spatial

information and map files. After that, the Controller components are used to call MapServer to read the

spatial information and conduct overlay mapping.

The inundation depth layers are differentiated with

colors according to the water depth difference, so

as to present the spatial information of inundation

simulation in the users’ browsers.

Figure 3 shows the operation procedures of the

ISS Controller components on the users’ operation

interfaces, indicating that the Controller components

simulate and display the system behaviors for

the users. When entering the ISS, the users firstly

add the inundation simulation input files into 2D

inundation model and start to establish the project

directory, then conduct environment configuration

before simulation, and execute the simulation model

in the end. After the results are produced, the records

are saved to the database for filing, a Shapefile is

generated at the same time, analysis is conducted by

MapServer CGI, the maps are produced and fit to

HTML template files, then posted back to the users. Figure 4 describes the interaction between all of the

components in the ISS, with the sequence diagram

of Unified Modeling Language (UML).Message 1-18 are to describe the message

t ime series when the online real-t ime two-

dimensional inundation simulation is conducted,

which can be compared with the procedures in 2D

inundation model components shown in Figure 3,

the Controller component operation procedures.

Firstly, Message 1-10 describe the procedures for

uploading input files (or manually adding input

fields), to establishing the simulation environment.

Fig. 2. Inundation Simulation System (ISS) architecture.

Fig. 3. Controller component operations flow chart.

Page 8: Integrating Web GIS Technology and 2D Inundation Model to

( 84 )

Message 11-18 describe the simulation procedures,

‘save’ results, and converting and producing

spatial information files (Shapefile) and map

definition (.map) files. After Message 13 is sent, the Controller will call the exec() function to execute

HPUMP2D_72.exe, the main program of the two-

dimensional inundation model, and will generate in

the server host, a new process. Meanwhile, Message

14 is generated to monitor the two-dimensional

inundation simulation program until the end of

execution, after the inundation simulation result files are generated. According to the cases, DEM grid

quantity calculation time differs, from a few minutes

to a few hours. After simulation calculations are

complete, and the spatial information files are

converted and generated, Message 18 will present

the results in the users’ browsers. Next, Message

19-20 describes the users’ operation systems, and

MapServer is used for spatial information display.

In the ISS sequence diagram, Message 13

conveys that, the Controller will execute the

inundation calculation and sends the exec() function

to the 2D inundation model components. However,

according to the above, the inundation simulation

calculation may be executed for hours due to grid

quantity of DEM data. Also, in Apache web server,

processes opened in webcall mode (e.g., the two-

dimensional inundation model) will be opened as a

child process, and managed by the parent process

(i.e., Apache web server). In order to ensure the

server’s efficient operation, all child processes’

operation times are restricted to normally 10 to 15

minutes. As a result, there are issues of executive

processes being timed out; and, the two-dimensional

inundation model cannot be correctly executed. In

order to successfully execute the external program

with the online execution time in a Windows

operation system, PStool suite can be used to solve

this problem.

PStool suite was developed by Winternals

Software, a company purchased by Microsoft

Corporation in 2006. Hence, PStool suite now is

owned by Microsoft Corporation and is free to the

public. Currently, the latest version of PStool suite

is v2.44 (Windows Sysinternals, https://technet.

microsoft.com/en-us/sysinternals/pstools.aspx). It

includes a kit of command line series which can

help users manage remote systems and local systems

with Windows operation systems. PStool suite is

compatible with most Windows-owned operation

systems, and can be directly used on clients or

servers without any installation files. To realize

the online real-time two-dimensional inundation

model, the PsExec tool in the PStool suite is used

to enhance the capabilities of remote computers

(namely, on the user side) to execute the server

host’s processes or software, so as to create new

execution program processes and solve overtime

issues in process operations.

In system development, executive processes’

Fig. 4. Inundation Simulation System (ISS) sequence diagram.

Page 9: Integrating Web GIS Technology and 2D Inundation Model to

( 85 )

timeout issues are found when executing server

processes with web pages. In order to solve the

issues, PsExec.exe, one of the programs in the

PStool library must be added to help the system

open two-dimensional inundation models as a

‘new processes’; to prevent the Apache web server

from executing the two-dimensional inundation

model as a child process, thus leading to forced

shutdown by the Apache server due to an execution

that timed out, and the unsmooth execution of

two-dimensional inundation simulations. The

code, PsExec, and the function, exec(), are used to

execute the two-dimensional inundation model’s

main program execution file (HPUMP2D_72.exe).

Now, instead of the above method, arguments are

added to the calling function exec() parameters to

call PsExec.exe to execute the two-dimensional

inundation model’s main program. The argument,

PsExec, must be placed first, so that subsequent

programs will be opened by PsExec.exe. Next, the

argument, –accepteula, executes the PStool tool;

and the argument, -d, is used since the Apache

web server process does not monitor the two-

dimensional inundation process, and as a result,

the argument can be opened as a new process.

After this step is completed, the online real-time

inundation simulation will be successfully executed

and awaiting the system’s responses, to obtain the

inundation results.

After the two-dimensional inundation model

are executed, it must be verified whether the

programs are completed. As mentioned above, in

order to prevent the two-dimensional inundation

simulation process is opened by the Apache

web server as a child process, which leads to an

abnormal execution due to the executive process

being timed out, PsExec is used to solve the

issues. However, this method prevents the Apache

web server from monitoring the return values of

the executive processes. Hence, after the system

dispatches the two-dimensional inundation process,

a script with a monitoring mechanism is introduced

to the system. Its effect is to detect whether the

two-dimensional inundation model has generated

execution result files, the basis for determining

whether the inundation simulation has completed.

Based on the online real-time two-dimensional

inundation simulation, the inundation simulation

information is obtained, and is the two-dimensional

inundation literal data. In order to use MapServer

to display the spatial information, the literal data

must firstly be converted into spatial information,

and the map definition files generated (.map). These are necessary for the execution of MapServer. In the

end, the start webpage and the HTML template file are linked, to correctly display the map on the web

pages. As a consequence, the above steps are started

after the Controller detects the inundation data files.(1) Spatial information file conversion: this

research uses BytesFall Shapefiles, licensed under

a general public license (GNU), and includes these

Shapefiles within its spatial information conversion library. The users can edit it according to their

own data formats and convert the text information

into Shapefiles for GIS to use. Developed in PHP

language in 2006, BytesFall Shapefiles can be used to convert the existing 2D graphical data and enable

the users to edit the data structure of attribute data

(DBF) files on their own. BytesFall Shapefiles is

currently in its second edition, while creat_shpfile.php and ShapeFile.lib.php are mainly used in

studies. ShapeFile.lib.php is the library to which

spatial information conversion functions are saved,

and can be called after being introduced into the

code to execute data conversion as the function,

require_once().

The source code, creat_shpfile.php, is firstly

introduced in the library, and then the maximum

coordinate value and the minimum coordinate value

of the Shapfile are respectively defined on x and y axes. After defining the boundary, all point data are imported, and title columns of the property table are

defined. Function setDBFHeader() is used to define the columns, then all data are added to the property

Page 10: Integrating Web GIS Technology and 2D Inundation Model to

( 86 )

table. Converting literal data to spatial information

is completed when the data are named and saved.

(2) Real-time display: in order to display online

real-time spatial inundation information, MapServer

CGI must be added to the Apache web server. To

do this, merely add the file, mapserv.exe, to the web server’s cgi-bin directory.

3. INUNDATION SIMULATION SYSTEM ACHIEVEMENT

3.1 Study area and data description

In this research, an original two-dimensional

inundation model is used to simulate single

rainfall events in Luzhou and Sanchong Districts

in New Taipei City, as test cases. Figure 5 shows

the locations of the Luzhou and Sanchong study

area, as well as all rainfall stations and hydrologic

stations. The DEM data are constituted by 40 by 40,

2-degree zone coordinate system, grids. The scope

of the X coordinate is from 295120 to 300040,

and the scope of Y coordinate is from 2771360 to

2777080, running about 5.8 km from east to west,

and a maximum elevation difference of 9.58m.

The two-dimensional inundation computational

grid coordinate system is divided into 124 inch-

sized X-direction grid squares and 144 inch-sized

Y-direction, with the total grids equal to 124*144.

Figure 6 shows the rainfall hyetographs of the

cases in this area, 4 rainfall stations independently

recording 24-hour rainfall data. It can be seen from

the rainfall map that the rainfall is focuses during

9:00 to 17:00. The inflow data and hydrograph are shown in Figure 7 for 3 rainfall stations recording

the inflow data in the area.In order to simulate the raining period for

online real-time inundation calculation, assuming

Fig. 5. Inundation Simulation System (ISS) sequence diagram.

Fig. 6. 24-hour rainfall duration hyetograph in the Luzhou and Sanchong study area. Note: (a) Rainfall station 1; (b) Rainfall station 2; (c) Rainfall station 3; (d) Rainfall station 4.

Fig. 7. 24-hour inflow duration hydrograph in Luzhou and Sanchong.

Page 11: Integrating Web GIS Technology and 2D Inundation Model to

( 87 )

that it takes 6 hours for one rainfall forecast: firstly, the 0-6 hours’ rainfall forecast is input into the ISS

to simulate the 6-hour inundation status; then, the

7-12 hours’ rainfall forecast is inputted; after that,

the 6-hour water state is used to reckon to the 12-

hour data and so on till the 24-hours are complete.

This simulation cannot be conducted, however,

when limited to the two-dimensional inundation

model based on events. Hence, in this research,

rainfall events are divided at 6-hour intervals, and

single rainfall events are re-divided into 6-hour, 12-

hour, 18-hour and 24-hour rainfall duration (e.g., the

12-hour rainfall duration in Luzhou and Sanchong

Districts, the 18-hour rainfall duration in Luzhou

and Sanchong Districts. In other words, among

the new event data of the rainfall records captured

before 12- and 18-hours of the original records

(for Luzhou and Sanchong Districts, there is no

rainfall record before 6-hours so it is not taken as a

simulation case for discussion), consistency between

the simulation results of all rainfall duration events,

and 24-hour rainfall duration events is verified at 6-, 12-, 18-, and 24- hours.

3.2 Test case

In order to verify the ISS, the results obtained

via the original two-dimensional inundation model

are compared with those obtained from the spatial

information exhibition by using the commercial

software ArcGIS.

Firstly, verify that the online real-time

inundation simulation can produce correct results

and compare the inundation information files

simulated online by the ISS with those simulated

by the original two-dimensional inundation model.

Table 1 shows the inundation results (partial

Table 1. Comparison of simulated results for 24-hour rainfall duration in Luzhou and Sanchong Districts

2DIM ISS system

X Y Inundation depth (m) X Y Inundation depth (m)

298320 2771360 0.1 298320 2771360 0.1

298360 2771360 0.1 298360 2771360 0.1

298400 2771360 0.1 298400 2771360 0.1

298440 2771360 0.1 298440 2771360 0.1

298280 2771400 0.1 298280 2771400 0.1

298320 2771400 0.188 298320 2771400 0.188

298360 2771400 0.193 298360 2771400 0.193

298400 2771400 0.195 298400 2771400 0.195

298440 2771400 0.195 298440 2771400 0.195

298480 2771400 0.001 298480 2771400 0.001

298240 2771440 0.001 298240 2771440 0.001

298280 2771440 0.197 298280 2771440 0.197

298320 2771440 0.194 298320 2771440 0.194

298360 2771440 0.194 298360 2771440 0.194

298400 2771440 0.194 298400 2771440 0.194

298440 2771440 0.194 298440 2771440 0.194

298480 2771440 0.002 298480 2771440 0.002

298520 2771440 0.101 298520 2771440 0.101

298240 2771480 0.001 298240 2771480 0.001

298280 2771480 0.19 298280 2771480 0.19

298320 2771480 0.19 298320 2771480 0.19

298360 2771480 0.191 298360 2771480 0.191

298400 2771480 0.192 298400 2771480 0.192

298440 2771480 0.192 298440 2771480 0.192

Page 12: Integrating Web GIS Technology and 2D Inundation Model to

( 88 )

locations) simulated by the ISS and 2DIM for

24-hour rainfall duration events in Luzhou and

Sanchong Districts. Table 1 shows that the results,

from ISS online real-time inundation simulation and

the original 2DIM, are consistent.

The spatial inundation information displayed

with the ISS’S Web GIS display function is

compared with the spatial information displayed

with the commercial software ArcGIS. The

simulated results are shown in Figure 8, with the

situations at 12-, 18- and 24-hours in Luzhou and

Sanchong Districts as the examples. In Figure 8, the

left images are from the ISS webpage and the right

images are from ArcGIS. After 12-hours of rainfall,

the research area was inundated, with a heavy

inundation situation on the east side of the study

area. After an 18-hour rainfall inundation situation,

the dark block on the east side, was significantly

enlarged. As for the inundation situation within the

last 24-hours, the inundation range was vaguely

reduced. According to the spatial information map,

the continuous changes in inundation flows can

be obviously seen from the beginning; and the

maximum range of the rainfall events’ reduction at

12-hours, 18-hours, and 24-hours in the research

area, is associated with the tendency that the

precipitation gradually increases then decreases

shown in the rainfall event records in Figure 6. It

is verified that the spatial information display can

help to understand the correlation between rainfall

events and inundation flows. The spatial information displayed in Figure 8 of the maps on the left and

on the right almost coincide with each other, which

certifies that ISS can correctly display inundation

information.

3.3 Inundation simulation system displays

Figure 9 shows the ISS operation procedures.

Enter the home page of ISS to see the basic system

instructions, the two-dimensional inundation

simulation, and Web GIS display button. Click the

Web GIS display button to enter the MapServer

display page and view the system case events, and

all the users’ simulation case events. Click ‘two-

dimensional inundation simulation’ to conduct an

online two-dimensional inundation simulation,

add events, and input data (by uploading files or to inputting data), and start the inundation simulation

after the data are imported into the system. After

simulation completion, click the Web GIS display

button to enter the display page, select simulation

events in the drop-down menu, and to display the

inundation simulation spatial information with

MapServer.

The users can enter the system’s web portal

by entering its URL (http://hirg.cycu.edu.tw/

iss/) in browsers. On the home page, the system’s

purpose is briefly stated, and the simulation and

display functions are described. Firstly, click the

‘two-dimensional inundation simulation’ button to

enter the page that describes the two-dimensional

inundation simulation. The page is divided into two

parts, the main window on the right-side details the

input file content and file formats necessary for the two-dimensional inundation simulation; and the

auxiliary window on the left side has two buttons,

‘upload input data’ and ‘fill in input data’, for users to upload input files or enter rainfall information

into web forms, to build new input files.After uploading input data or inputting data

into the system, the page will display the event

contents of this simulation and generate a start

button to begin the simulation. After the simulation

is completed, a prompt message will appear in

the browser to notify users that the inundation

simulation is completed. The simulation time will be

shown and a navigation button for users to advance

to the Web GIS display system. Figure 10 is a

screenshot of the display system. System research

cases and users’ simulation cases can be selected

for display in the drop-down menu on the left side

of the screen. Figure 11 shows a 24-hour rainfall

duration simulated inundation results for the system

research case named, “Typhoon Saola_Wujie Town,

Page 13: Integrating Web GIS Technology and 2D Inundation Model to

( 89 )

Fig. 8. Analysis of spatial inundation information of rainfall events at (a) 12-hours, (b) 18-hours, and (c) 24-hours in Luzhou and Sanchong Districts.

Page 14: Integrating Web GIS Technology and 2D Inundation Model to

( 90 )

Yilan”. The control panel on the right side of the

screen is for users to operate the display data. Click

the ‘Update’ button to control the size of the map

after inputting the ‘Size’ value; and select to zoom

in or out with the optional button (‘Ratio’); or use

the mouse to click the locations for viewing on the

map; and re-centering selected locations on the map.

Many checkboxes on the bottom of the control panel

can be used to open or close the display images.

4. CONCLUSION AND SUGGESTIONS

4.1 Conclusion

This research integrated Web GIS and a two-

dimensional inundation simulation for web server

application to develop the ISS, with online real-

time inundation simulation functions and simulated

spatial inundation information browser-based

display. With data about many areas established

in the ISS, and combined with real-time rainfall

event data, inundation simulations were conducted

to gain inundation depth information of all points

in the areas. After the simulation was completed,

MapServer was used to display the spatial

inundation information. Luzhou and Sanchong

Districts were taken as the test cases, and through

test and analysis, the following conclusions were

drawn:

(1) From the research and case test, it is found that

the results from the two-dimensional inundation

Fig. 9. Inundation Simulation System (ISS) operation procedures.

Fig. 10. Web GIS display page.

Page 15: Integrating Web GIS Technology and 2D Inundation Model to

( 91 )

model used with web server technology for real-

time online inundation simulation, are consistent

with those from the original two-dimensional

inundation simulation, so that ISS online user

interfaces can be used instead of the complex

manual operational procedures of the original

two-dimensional inundation model.

(2) Based on a practical system test, ISS indeed can

establish real-time spatial information files (i.e., Shapefiles) according to inundation depth data, and correctly display it as a map since the Web

GIS and real-time display, MapServer, and the

online two-dimensional inundation model are

integrated.

(3) Apache web server and MapServer, the

development software used in this research, are

all GNU software. No extra research expense is

needed for system development. It is a feasible

method taking into consideration the economic

factors typically involved.

(4) Apache web server executes the two-dimensional

inundation model as a child process. If the

execution takes a long time, it will be timed out

by the server and the two-dimensional inundation

model cannot successfully execute. Our research

overcomes this problem, by combining the

‘PsExec’ tool in the ‘PStool’ library, with PHP

language on the web server, to enable users to

execute the two-dimensional inundation model

online with browsers and without downloading

or installing any file.

4.2 Suggestions

(1) A complete inundation warning system must

contain four parts: real-time rainfall observation,

an inundation calculation model, spatial

inundation information display, and an alert

information report. Using network technology,

ISS firstly integrates the inundation calculation

model with spatial inundation information

display technology, to preliminarily verify

the feasibility of technology integration. It is

suggested to continuously integrate all disaster

warning technologies in the future, to achieve

the goal of disaster prevention with science and

technology; under the condition of no manual

operation for weather monitoring, disaster

warning, and alert issuing.

Fig. 11. Inundation Simulation System (ISS) system display page.

Page 16: Integrating Web GIS Technology and 2D Inundation Model to

( 92 )

(2) At present, the ISS only offers 5 areas for users

to conduct online simulations, since geographic

data (such as topography and boundary) is

limited. In the future, with more geographic

data of more areas gradually imported, the

system will provide more inundation simulation

information.

(3) In the two-dimensional inundation model, the

problem of time-consuming simulation exists.

In the future, this problem must be considered

and attempted to be solved before multi-mode

integration simulations can occur. For example,

modifying the core to improve calculation

efficiency, or combining cloud technology to

enhance operation efficiency. In this way, the

system can really achieve the purpose of rapid

simulation at the earlier stages of disasters.

(4) In the future, the functions of layer overlying,

raster format layer display, and advanced

operation can be added to Web GIS display in

the ISS system, to optimize its operation and

display.

REFERENCES

Chang, W. Y., Lai, J. S., Wang, S. C., Hung, G. J., Yu, T. Y., Lee, L. C., Guo, W. D., Tsai, W. F., 2013, “Development and Application of Multiple 2D-SWE-Model Platform”, Journal of the Chinese Institute of Civil & Hydraulic Engineering, Vol.25, No.1, pp.21-32.

Chung, J. A., Holly, F. M., Verway, A., 1980 “Practical Aspects of Computational River System,” Pitman Publishing Limited, London.

Guidolin, M., Chen, A. S., Ghimire B., Keedwell E. C., Djordjević, S., Savić, D. A., 2016, “A Weighted Cellular Automata 2D Inundation Model for Rapid Flood Analysis”, Environmental Modelling & Software, Vol.84, pp. 378-394.

Lai, J. S., 1986, “Two Dimensional Inundation Model for Levee Breaking”, Master Thesis, National Taiwan University.

Lin, S. S., Hsieh, S. H., Kuo, J. T., Chen, Y. C. and Liao, Y. P., 2004, “Integrating SWMM with Optimization Module for Feasibility of Real Time Control in Urban Drainage Systems,” Proceedings of the 6th International Conference on Hydroinformatics, Vol. 2, pp. 1899-1906, Singapore.

Lin, S. S., Liao, Y. P., Hsieh, S. H., Kuo, J. T. and Chen, Y. C., 2010, “A Pattern-Oriented Approach to Development of a Real-Time Storm Sewer Simulation System with an SWMM Model,” Journal of Hydroinformatics, Vol.12, No.4, pp.408-423.

Lin, S. S., Lu, S. F., Zhu, B. H., 2014, “Development of the SWMM Hydraulic Parameters Optimization Model”, Taiwan Water Conservancy, Vol.62, No.4, pp. 104-116.

Lin, W. L., Kan, P. S., Lin, S. S., 2014, “Integrating Web GIS Technology and an ANFIS Model to Develop a Warning System of Storm Sewer Water Stage”, Journal of Technology, Vol. 29, No.2, pp.105-114.

Savage, J. T. S., Pianosi, F., Bates, P., Freer, J., Wagener, T., 2016, “Quantifying the Importance of Spatial Resolution and Other Factors Through Global Sensitivity Analysis of a Flood Inundation Model”, Water Resource Research, Vol.52, pp.9146-9163.

Teng, J., Jakeman, A. J., Vaze, J., Croke, B. F. W., Dutta, D., Kim, S., 2017, “Flood Inundation Modelling: A Review of Methods, Recent Advances and Uncertainty Analysis”, Environmental Modelling & Software, Vol.90, pp.201-216.

Tsai, W. S., Lin, S. S., Hsieh, S. H., Liao, Y. P., 2009, “Integrating Real-Time Storm Sewer Simulation and Web GIS into Urban Sewer Warning System - A Case Study of the 4th Drainage Area in Taipei City.”, Journal of the Chinese Institute of Civil & Hydraulic Engineering, Vol.36, No.6.

U.S. Army Corps of Engineers, 1990, “HEC-1 Flood Hydrograph Package: User's Manual and Programmer's Manual,” Hydrologic Engineering Center.

WL| Delft Hydraulics, 2001, “SOBEK Software User’s Manual,” Delft, The Netherlands.

Received: 107/09/05

Revised: 107/11/12

Accepted:107/11/29