Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Navigate Safe: Flood-Safety Navigation and
Management System Using Android Platform
GRADUATE PROJECT REPORT
Submitted to the Faculty of
the Department of Computing Sciences
Texas A&M University – Corpus Christi
Corpus Christi, Texas
In Partial Fulfillment of the Requirements for the Degree Of
Master of Science in Computer Science
By
Christina Shiny Pulipati
Summer 2018
Committee Members
Dr. Dulal Kar __________________________________
Committee Chairperson
Dr. Mamta Yadav __________________________________
Committee Member
ABSTRACT
Floods have been a threat to the world since a long time and disaster management for floods
always has scope for improvement. An existing problem of floods is that some low-lying areas are
flooded even when the rain has ended. Effective evacuation measures are also required. This leads
to problems in navigation and also, vehicles being stuck in the flood areas. To handle this, a flood
management system application is suggested which has modules for flood reporting, emergency
requests, navigation and flood handling information. The Flood Monitoring system aims to solve
the problem of navigation, highlighting the flooded areas using location based services and also
handle emergency reports using an android application. It strives to make navigation easy by
combining the flood reports received, with maps to provide easy navigation with knowledge of the
flood areas. The mobile application receives flood reports and emergency reports and provides
navigation from a source to the destination set by the user and uses the flood reports to indicate
the flood areas in the route. The admin module consists of functionalities to receive and handle the
reports and get live locations of the vehicles. This application helps to make navigation easy and
hassle-free, in case of a flood occurrence.
TABLE OF CONTENTS
CHAPTER Page
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
TABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1. BACKGROUND AND RATIONALE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Global Positioning System (GPS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Google Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Android Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
1.5 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Solution: Navigate Safe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2. SYSTEM DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1 Software Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Modules Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.6 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . 17
2.6.1 Admin User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . 24
3. SYSTEM IMPLEMENTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.1 Setting permissions required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
3.2 Login module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Encryption for account passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.4 Reporting Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.5 Routing Technique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4. EVALUATION AND RESULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.1 Login Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2 Reporting Floods Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3 Emergency Reports Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.4 Navigation Test Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.5 Options Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.6 Admin Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.7 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5. CONCLUSTION AND FUTURE WORK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
LIST OF FIGURES
FIGURE Page
1 Architecture of the application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 Use case diagram for user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 Admin use case diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 Class diagram for android end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 Class diagram for the server side of the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6 Login screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
7 Registration screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8 Flood report screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9 Location selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10 Emergency report form screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
11 Navigation screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
12 Options module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
13 Admin menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
14 Permissions required in AndroidManifest.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
15 Login details from database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
16 MD5 hashing algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
17 Reporting floods implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
18 Creating the flood objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
19 Navigation data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
20 Nearest flood distance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
21 Setting colors for routes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
22 Mapfragment initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
23 Calculation of distance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
24 Login test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
25 Flood report creation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
26 Emergency report test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
27 Distance of the nearest flood from the current location. . . . . . . . . . . . . . . . . . . . . . . 36
28 Floods depicting danger zone in navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
29 Warning zone in navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
30 Safe zone depicted in navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
31 Flood reports view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
32 Admin module menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
33 Admin view of all floods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
34 Admin view flood reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
35 Admin emergency reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
36 Admin live locations view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
LIST OF TABLES
TABLE Page
1 Evaluation survey of the application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
1
CHAPTER 1
BACKGROUND AND RATIONALE
Floods are one of the most catastrophic events that can occur naturally, all around
the world. Floods form over a few days when the rainwater level exceeds the normal amount.
Flooding can also occur in a shorter period of time with high rainfall. Countries like Indonesia, Sri
Lanka, India and parts of USA are flood-prone countries. In the United States, Texas has been
identified to be the most flood-prone area, by the National Weather Service. The state of Texas
leads the nation in having the highest flood related deaths and damages every year. The Texas
Department of Public Safety stated that Texas has the least number of state employees devoted to
disaster preparedness among the populous states of USA. Hurricane Harvey, which was the
strongest hurricane to hit the US in 12 years, brought in more than 19 trillion gallons of water. In
most parts affected by Hurricane Harvey, transportation remained at a standstill, which causes
recovery to be disrupted for a longer time.
A major issue post floods is for the water level to recede to allow usual transportation to
take place. The Navigate Safe application focuses on the issue of road safety in a post-flood
environment or during a flash flood in an emergency situation. In order to make navigation in such
environments hassle-free, the location-based services of android systems can be worked on.
Considering the reliability of geolocation using android devices, the location-based services can
be used for information, security and navigation.
Location-based services are used to personalize android applications using the current
location, based on the functionality of the application [9]. The location-based service uses the
Geographical Information System (GIS) to provide the features such as current location tracking
2
and navigation from a source to destination. To track current location, technologies such as cell
identification, GPS, accelerometers etc are available. GPS technology is most widely used as it
provides high accuracy in finding the coordinates of a location. Using google Maps on GPS
enabled devices, makes it easier to provide navigation feature [9].
Existing flood management applications do not consist of effective navigation and
emergency requesting features. There is no exact source of local flood data that is easily available
to the users. As the data of flood level in localities is not easily available to the users, crowd-
sourcing is suggested to be used.
1.1 Global Positioning System (GPS)
The GPS system is a network of satellites which orbit around the earth and send accurate
information of the object position based on their importance. The technology uses signals from the
GPS receivers which are used to get the precise location, speed and time of an object. Signals must
be received from a minimum of four satellites of the orbit. The satellites transmit the radio signals
to the GPS receiver which helps in finding the distance between them. In order to increase the
accuracy and precision of the position, triangulation technique is used [15].
1.2 Google Maps
Google Maps is a mapping service provided by Google, which can be used on the android
platform. It provides images from satellites, street view, navigation and also real-time traffic
conditions. The google maps application is a very useful application which also includes transit
information, construction and accidents taken place [9].
3
1.3 Android
A popular open source operating system for mobiles is the android system which is a
system based on Linux and java. It is highly preferred over iOS as it is an open source operating
system and provides ease in developing applications. It consists of a stack which includes an
operating system, middleware and integral applications which are maintained by Google. The
other platform which is widely used is the iOS which is not open source and is only specific to
iPhones. There are several versions of android operating system which have several updates. The
first android version is Cupcake (Version 1.5) followed by Donut (Version 1.6), Eclair (Version
2.0 2.1), Froyo (Version 2.2), Gingerbread (Version 2.3), Honeycomb (Version 3.0 3.2), Ice Cream
Sandwich (Version 4.0), Jelly Bean (Version 4.1- 4.3), KitKat (Version 4.4), Lollipop (Version
5.0 5.1), Marshmallow (6.0-6.0.1), Nougat (7.0 7.1.1) and latest version being Oreo (8.0-8.1).
Since it is an open source environment, there are many built-in APIs, using which applications can
be developed and uploaded to the google play store [8].
1.4 Android Studio
Android Studio is Android’s official integrated development environment (IDE) based on
IntelliJ IDEA and available for download on Windows, macOS and Linux. It is built for android
to accelerate development and help in building the highest quality applications for every android
device. It offers tools custom-tailored for Android developers, including rich code editing,
debugging, testing, and profiling tools [8].
1.5 Related Work
The trend of technology being used to help in making natural disasters easier to people is
an important research area. In [12], Ira et al., suggest a hurricane evacuation model which uses
4
geospatial data and the Dijkstra’s shortest path algorithm to simulate the traffic during evacuation.
This paper gives an overview of a model for traffic during regional evacuations due to hurricanes,
using queueing theory to describe traffic congestion. Other methods of modeling traffic are also
evaluated. A simulation of a hurricane evacuation in Massachusetts was created, and the simulation
was used to identify congested and potentially vulnerable regions. The model was validated against
navigation predictions from other software. The results of the model indicate that Boston and the
bridges to Cape Cod are particularly vulnerable to congestion, and that some people remain on the
road many hours after the beginning of the evacuation. A visualization for the model was also
designed to present the simulation in a visually accessible way to both experts and the public.
In [3], Indah et al., propose a framework to provide emergency navigation for people within
flooding events. Real-time data from weather stations are downloaded for the flooding simulation
in the framework. Sensors are disposed along the river, and the collected sensor data is suggested
to be of use to update the simulation results to provide more accurate estimation of flooding events.
After flooding models are constructed, this work further includes and modifies the Dijkstra
algorithm for the navigation. The navigation algorithm dynamically considers the traveling speed
of users, the real-time flooding data, and the estimation of flooding to provide the best route which
is not only the shortest path to destinations but also relatively safe. In their implementation, the
map of Manado City is included in the experiment, and the traces of the real flooding data of
Manado City are also included as the input. The experimental results show that the framework can
immediately provide alarm and navigation when a node in the map is prone. And if the height of
the flood is still increasing, the rescue teams will need to rescue the motorists from their stranded
vehicles so that they won’t drown if the height of the flood goes higher than their vehicles. With
the help of the smartphones GPS, the authors suggest that accessing the user’s location will help
5
the rescuers to be able to identify where the user’s location is, and to rescue the users from being
flooded. Providing routes avoiding floods in the map is suggested to be effective in the study.
In the study of Guzman et al., it is suggested that using an arduino microcontroller can be
effective in detecting the height of a flood [13]. According to their study, they use an Ultrasonic
Sensor to detect the range of the flood and a camera for the real-time feedback of the flood. At the
same time, it will send a message using a serial communicator to the links that was saved by its
admin which can help the motorists avoid the flooded areas which can waste their time in finding
another alternate route. In this aspect the authors improve their study by implementing a mobile
application so that the admin won’t need to register all the contacts of each person that wants to
receive the notification. By having a mobile application, the users can register their own as well as
get only the notification when they are within the area. They also removed the GSM module since
a voice notification is added so that the user won’t need to read the notification since the user might
be currently driving and have no time to read the message.
In [1], Swapnil et al., suggest that flooding is influenced by various hydrological &
meteorological factors. A number of researches have been done in flood disaster management and
food prediction systems. However, it has now become significant to shift from individual
monitoring and prediction frameworks to smart flood prediction systems which include
stakeholders and the flood affecting people equally with help of recent technological
advancements. Internet of Things (IoT) is a technology that is a combination of embedded system
hardware and wireless communication network which further transfers sensed data to computing
device for analysis in real-time. Research in the direction of flood prediction has shifted from
mathematical models or hydrological models to algorithmic based approaches. Flood data is
dynamic data and non-linear in nature [1]. To predict floods, techniques such as artificial neural
6
networks are used to devise prediction algorithms. Here an IoT and artificial neural network
(ANN) based flood monitoring and prediction system is designed with the aim of enhancing the
scalability and reliability of flood management system. The main aim of this system is to monitor
humidity, temperature, pressure, rainfall and river water level and to find their temporal correlative
information for flood prediction analysis. The IoT approach is deployed for data collection from
the sensors and communication over Wi-Fi and an ANN approach is used for analysis of data in
flood prediction.
In [2], Katun et al., suggest that allocating victims to camps and provide medical facilities
are two main activities at the immediate response phase of a flood and use of manual methods
delayed this process. This project developed a geo-enabled application to support immediate
response planning, mainly focusing on allocation victims to IDP camps, provide medical facilities,
and supporting access avoiding already blocked roads based on administrative divisions of the
affected area. Capacities and facilities in camps and hospitals are matched against the needs of the
victims. It identifies the blocked roads, alternative routes to reach resource centers, camps and
hospitals and provide navigation guidance. The tool can be used after a flood disaster, assuming
basic demographic data and the current flood affected area data are available. The tool is developed
as a plug-in for QGIS, a free and open source desktop Geographic Information System software.
In another study of Fabito et.al., crowdsourcing can be used by people in the area to validate
if a report is true. Since there can be a lot of people who might give bogus reports, it will be helpful
that the reports can be validated by other people that is within the area where it is reported [14].
Crowdsourcing can also be helpful if there are places that does not have an Arduino
microcontroller device to identify a flooded motorway, the motorists can also report the flooded
area and can be validated by another motorist using the idea.
7
1.6 Solution: Navigate Safe
Considering all the related work in the system of floods, it is understood that effective
navigation which includes flood details, emergency report handling are important aspects for
floods during evacuation or in a post-flood environment. It is made accessible to the users by
developing an android application with the features.
Functionalities of the proposed application:
• The application is used to report a flood in a location by specifying the flood height in the
location.
• An emergency can be reported to the admin when the user’s vehicle is stuck, and help is
required.
• The user can use the navigation feature to find the route from the source to the destination
and find all the floods which have been reported in the route.
• The user can access all the flood reports, emergency reports and safety measures in the
application.
• The admin of the application can approve or delete the reports.
• The admin can access the live locations in order to complete emergency requests.
8
CHAPTER 2
SYSTEM DESIGN
2.1 Software Requirements
The system requirements that are necessary to develop this application are given below.
1. Operating System
• Windows (or)
• Macintosh OS
2. Database
• MySQL: MySQL is an open-source relational database management system. It was
established in May 1995 to provide various database operations and provide support for
applications which require database operations.
• Amazon Web Services: Amazon Web Services (AWS) is an on-demand computing
platform. It is web service and cloud computing resource provided by Amazon. AWS
provides huge computing capacity which is faster and cheaper compared to other clients.
3. Integrated Development Environment
• Android Studio: Android Studio is a development environment which provides Gradle
based support, Lint tools for performance analysis, rich layout editor for drag-and-drop UI
components and an Android Virtual Device emulator. The AVD emulator provides a
virtual android device environment which is integral in testing the application in all stages
of development.
9
• Spring Tool Suite: The Spring Tool Suite provides a ready-to-use environment to
implement, debug, run, and deploy any Spring applications. Also, the Spring Tool suite
supports application targeting to local, virtual and cloud-based servers.
4. Programming Language
• JAVA SE 8: Java is a general-purpose, object-oriented computer programming language.
It is platform independent that works on Java Virtual Machine (JVM). It includes features
of annotations, expressions and date and time API.
5. Minimum Hardware Requirements
• 1GB RAM
• 4GB Internal storage
• Dual-core processor
• A mobile phone with android operating system version 5.0 or greater
2.2 System Architecture
Figure 1 – Architecture of the application.
10
The architecture of the system proposed is displayed in Figure 1. The application consists
of modules for user interface, database management, services, REST services, JSON, Retrofit, and
Amazon Web Services. JSON data is used to communicate through the application. The services
module helps in retrieving results from JSON and process the data using techniques to achieve the
output. REST module is used for implementing the code and handle all the requests in the server.
The database activity is worked on using MySQL and SQLite databases. The resultant JSON data
is displayed in the user interface module.
2.3 Modules Description
• User Interface
The user interface is the view that is visible to the user and has the ability to perform some
functionalities. It is developed by using XML, activities, fragments, and adapters. Requests can be
sent, and responses are visible to users with the help of view.
• REST Service
Representational State Transfer also commonly known as the REST service is a web
service used to offer interoperability between various computer systems available on the internet.
In REST web service, the requests made to a resources will accept any request whether it is in
XML, HTML, JSON or some other defined formats. REST service aims at achieving fast
performance, reliability, and the ability to grow without affecting the system on its own.
11
• JSON
JSON, JavaScript Object Notation, is an open standard format that is used to transmit the
data in the form of key-value pairs. It is the most common data format used for asynchronous
browser/server communication.
• Amazon Web Services
Amazon Web Services (AWS) is a part of the online shopping company, Amazon.com. It
offers a high-level Cloud Computing platform. Their services can be used for various services such
as computing, analytics, deployment and mobile developer tools.
• SQLite
SQLite is a relational database management system. In contrast to many other database
management systems, SQLite is not a client-server database engine. Rather, it is embedded into
the end program for faster retrieval of data.
• Google Places API
The Google Places Web Service is a service that returns information about a place: an
establishment, a geographic location, or prominent point of interest using an HTTP request. Place
requests specify locations as latitude/longitude coordinates. Two basic place requests are available:
search request and details request.
12
• Google Maps API
The Google Maps API lets developers to customize maps with their own content and
images for display on web pages and mobile devices. The Google Maps JavaScript API features
four basic map types (road-map, satellite, hybrid, and terrain) which can be modified using layers
and styles, controls and events, and various services and libraries.
• Google Geolocation API
The Google Maps Geolocation API returns a location and accuracy radius based on
information about cell towers and WiFi nodes that the mobile client can detect. The current
location of a user can be detected using this.
2.4 Use Case Diagram
A use case diagram shows the user interaction with the application system. The use case
diagram shown in Figure 2 represents the typical cases seen in the application. Overall it is used
to describe functionalities of the system in the form of an overview. The oval shapes show the
features that are provided to the actor or user. Any user can use the application once they register
successfully by providing basic information like name, e-mail etc. The login functionality allows
users to login into the application with the help of username/email and password which are set by
the user during registration. The report flood functionality enables the user to report a flood to the
system. The report emergency functionality allows you to submit emergency reports to the admin.
The logout functionality is available to the user after they login. In the navigation functionality,
the user can view the route from source to destination with the display of all the flood information
around the route. The distance from the current location of the user and the nearest flood reported
is also displayed. All the flood reports and emergency reports can be viewed from the options.
13
Safety tips are also included which can useful in emergency. The user needs to grant permission
to access user’s location and media files.
Figure 2 – Use case diagram for user.
14
Figure 3 shows the use case diagram for the admin component. The admin consists of
functionalities which are displayed below. The login functionality is used by the admin to login to
the application. The admin can view all the floods reported and can navigate to the flood location.
The admin can also receive flood reports to accept and allow all the users to view the floods in the
area. The emergency reports functionality is used to receive emergency requests and to handle
them. The admin can use the vehicle’s live locations functionality to help the users in case of an
emergency. The logout functionality is enabled after login.
Figure 3 – Admin use case diagram.
15
2.5 Class Diagram
The class diagram of the system is divided into two class diagrams where Figure 4
represents the android front-end classes and Figure 5 represents the server back end of the system.
The classes of the system, their attributes, methods and relationships between them are represented
in the figures.
Figure 4 – Class diagram for android end.
16
Figure 5 – Class diagram for the server side of the system.
17
2.6 User Interface
The User Interface of the application is an important component as it describes how the
user interacts with the system. This section includes all the pages which are developed in the
application. Figure 6 displays the login screen which also consists of an option to register.
• Login Screen: The login screen is used for authentication of a user, where email and
password are entered to access the application.
Figure 6 – Login screen.
18
• Registration Screen
Figure 7 shows the fields required to register as a new user in the application. When
the user accesses the application for the first time, the user needs to register in the
application by providing all the necessary details.
Figure 7 – Registration screen.
19
• Flood Report
The flood report screen is the main screen that is displayed when the user logs in
to the system. The first screen in this application is the flood reporting module which shows
the various options in the form of radio buttons to select the flood height. After selecting
from the form, the user is directing to a page to select the location and submit the flood
report. The page also consists of buttons in the bottom to navigate to the emergency reports,
navigation and other options component.
Figure 8 – Flood report screen.
20
Figure 9 shows the location picker, which helps to select the location from the map.
Figure 9 – Location selection.
21
• Emergency Reports
Figure 10 shows the screen for the emergency reports module. To submit an
emergency report, the user needs to fill the vehicle number, vehicle type, reason and also
pick the location. The report button will submit the report to the admin.
Figure 10 – Emergency report form screen.
22
• Navigation Module
Figure 11 consists of the navigation screen consists of the source which takes the
current location, but can be set to another location. The destination is selected from the
destination picker. This screen also displays the details of the nearest flood reported from
the user’s current location.
Figure 11 – Navigation screen.
23
• Options Module
The options module enables the user to view all flood reports, emergency reports.
The user can also access the safety tips before, during and after flood which are important
in case of emergency. Figure 12 displays the options menu module.
Figure 12 – Options module.
24
2.6.1 Admin User Interface
The admin module has the menu which has options to view all floods, can approve
or delete floods. The admin can view all the emergency reports and also access the vehicle live
locations to send help in case of emergency.
Figure 13 – Admin menu.
25
CHAPTER 3
SYSTEM IMPLEMENTATION
3.1 Setting permissions required
Figure 14 shows the permissions required in the application which are set in the
AndroidManifest.xml file. The flood safety system requires permissions to access current location,
connection to the internet, track accurate location, access, read and write external storage.
Figure 14 – Permissions required in AndroidManifest.xml.
26
3.2 Login module
To implement logging in to the application, the code checks the database and returns the
user account. Figure 15 shows the java programming to implement this basic functionality using
sql query. Hibernate is used to call the database.
Figure 15 – Login details from database.
27
3.3 Encryption for account passwords
Encryption of passwords is an important security measure to be taken. In the application,
the passwords are made secure by making use of the MD5 hashing algorithm. The code for
implementing the MD5 hashing in the passwords in the database is shown in Figure 16. The MD5
hash algorithm, which is a one way cryptographic function, takes a message as its input and
provides an output with a fixed value which is used to find the original message. Using MD5
algorithm is an effective security measure in this application.
Figure 16 – MD5 hashing algorithm.
28
3.4 Reporting Module
In the application, floods are reported and added to the navigation. Figure 17 shows the
code which adds the floods. The class reportFlood consists of the flood object and the image file
which is also added in the flood creation, as depicted in Figure 18. Thus, the flood report is
successfully created and reported to the admin.
Figure 17 – Reporting floods implementation.
Figure 18 – Creating the flood objects.
29
3.5 Routing Technique
The application requires the server to consist of all the necessary fields. The interface is
created as shown in Figure 19, which has fields for login, register, add report, add flood, view
floods, view emergency reports, get current location etc. It is used from the server side to initiate
the functionalities. The backend API is used and worked using Retrofit. Retrofit is used by the
class to get the data from the backend server. The data is then filtered based on the constraints
provided.
Figure 19 – Navigation data.
30
Figure 20 shows the implementation to find the nearest flood location. The latitude and
longitude information from the data is parsed and converted to return the distance to the nearest
flood which is displayed in the navigation module.
Figure 20 – Nearest flood distance.
Mapfragment is used to create the map on the map activity. It is a map component in the
application which helps in placing the map in the application. It acts as a wrapper around the map
view to handle the necessary life-cycle needs of the map. The floods are loaded, and the nearest
flood is found using selection sort. According to the destination entered by the user, the algorithm
calculates if there is a flood reported in that route within a 100 meters region. In case of a flood
present, the route is displayed in red, notifying danger in the navigation. If there is a flood reported
within a 300-meter range, the route is shown in orange which represents warning. If there is no
flood reported, the route is shown in green, notifying that it is a safe route which are implemented
in Figure 21.
31
Figure 21- Setting colors for routes.
The logic takes into consideration the coordinates from the path and finds the distance between
the flood location and the coordinates. The cartesian distance formulas are used to calculate the
distance between the two points.
Figure 22 shows the implementation of MapFragment setting the colors and initializing the
system. It also shows the implementation of navigation module, on starting navigation. Figure 23
shows the conversion and calculation of distance.
32
Figure 22 – Mapfragment initialization.
Figure 23 – Calculation of distance.
33
CHAPTER 4
EVALUATION AND RESULTS
In this chapter, all the functionalities are tested and validated in different scenarios.
4.1 Login Page
In this test case, the application is tested with an unregistered id and password. The
application shows a login error messaged which reads ‘Invalid login’. Every logout requires
the user to log back to the application. The error message is displayed when either fields are
empty or invalid. Figure 24 displays the test case when inaccurate credentials are entered, the
error message requests the user to try again using the right credentials.
Figure 24 – Login test case.
34
4.2 Reporting Floods Module
After successful login, the flood report page is opened which helps to select the flood
height, location and create the flood report. The location picker has successfully added the
location and the flood report is created. The flood reported will be submitted to the admin for
approval. Upon approval, the reported flood will be added to the map on the navigation module.
Figure 25 demonstrates the flood reporting functionality.
Figure 25 – Flood report creation.
35
4.3 Emergency Reports Module
The form in the emergency reports module is used to notify the admin which is received
and accepted in the admin module. The user selects the location and submits the emergency report
successfully. Figure 26 shows the location selection and report submission.
Figure 26 – Emergency report test case.
36
4.4 Navigation Test Case
Figure 27 displays the test case when the navigation module is opened, checking
for the distance of the flood which is nearest to the location of the user which is reported.
Figure 27 – Distance of the nearest flood from the current location.
37
The next test case in the navigation module is to check the floods reported which
are near the route. A source and destination is picked and as Figure 28 displays, the floods
reported nearby are displayed in the navigation.
Figure 28 – Floods depicting danger zone in navigation.
38
Figure 29 depicts the warning zone when the nearest flood from the route is present
within a distance of 300 meters.
Figure 29 – Warning zone in navigation.
39
Figure 30 depicts the safe zone when the nearest flood from the route is present farther
than a distance of 300 meters.
Figure 30 – Safe zone depicted in navigation.
40
4.5 Options Module
The options module displays the various reports and also safety measures for before
floods, during floods, and after floods scenarios. Figure 31 displays the floods reported by the
user and shows the approval status from the admin.
Figure 31 – Flood reports view.
41
4.6 Admin Module
The admin mode consists of a menu with options of viewing all floods, reviewing reported
floods, report a flood, view emergency reports and access vehicle live locations. Figure 32 displays
the admin menu. All the modules are explained in detail below.
Figure 32 – Admin module menu.
42
• View flood reports
The admin can view all floods reported by all application users. The admin can also
delete a flood reported when it consists of expired information. The status of the flood is
displayed.
Figure 33 – Admin view of all floods.
43
• Admin Flood Report Requests
The admin receives the floods reported by the users which can be reviewed and
accepted or deleted. The floods which are accepted can be viewed by all the users of the
application during navigation.
Figure 34 – Admin view flood reports.
44
• Admin Emergency Reports View
The admin receives the emergency reports which are reported by the users in case
of a problematic situation. The admin has the option to view the location and how far the
emergency is from the admin’s current location. Navigation can be done directly from the
emergency reports to effectively help the users.
Figure 35 – Admin emergency reports.
45
• Admin Live Locations View
The admin can view the live locations of the users in case of emergency to keep
track during floods as they can be catastrophic.
Figure 36 – Admin live locations view.
46
4.7 Evaluation
Evaluation of the Navigate Safe application is done by a survey of four users who tested
all the modules and aspects of the application. Each user evaluated the application based on the
user interface, ease of usage, login/registration, reporting floods, reporting emergencies,
navigation and understanding information in the application. The evaluation rating is given a rating
between [0,10] where 0 is the minimum and 10 is the maximum rating. The average rating of each
module is calculated to estimate the quality of the application according to the users. Table 1 shows
the evaluation points given. User interface can be improved with better design and user experience.
Criteria User 1 User 2 User 3 User 4 Average
User Interface 8 9 6 8 7.75
Ease of usage 9 8 9 9 8.75
Login/ Registration 9 10 9 9 9.25
Reporting Floods 8 10 8 9 8.75
Reporting
Emergencies
9 10 9 9 9.25
Navigation 10 10 9 9 9.5
Understanding
information
9 10 8 9 9
Table 1 – Evaluation survey of the application.
47
CHAPTER 5
CONCLUSION AND FUTURE WORK
Considering the various research done in the flood management systems of transportation
and navigation, an application Navigate Safe has been developed. Since google maps does not
include details about flooded areas on the roads, this application helps the users in knowing about
the floods reported in the location and navigate accordingly. The application also solves the
problem of vehicles being stuck in the roads by handling emergency requests. The application is a
complete flood road-safety management system which handles flood reports, emergency requests,
navigation system and also consists of informative safety measures which are useful in case of
emergencies. The admin module consists of flood reports approval, handling emergency requests
and manage the application.
Future Work:
• The application can be extended by collaborating with a weather service organization
which can consist of accurate data and infrastructure. This application will enable the
organizations to be more accessible to the public.
• Voice notifications can be added to the application, so that the application can also be used
by motorists.
• Adding a video can extend the usability of the application.
48
REFERENCES
[1] Bande, Swapnil, and Virendra V. Shete. "Smart flood disaster prediction system using IoT &
neural networks." Smart Technologies For Smart Nation (SmartTechCon), 2017 International
Conference On. IEEE, 2017.
[2] Ramanayake, Kasun, et al. "Geo-enabled FOSS Tool supports for immediate flood disaster
response planning." Information and Automation for Sustainability (ICIAfS), 2014 7th
International Conference on. IEEE, 2014.
[3] Kairupan, Indah, et al. "Emergency navigation and alarm with flooding models—A real case
study of Manado City." Communication Problem-Solving (ICCP), 2016 International Conference
On. IEEE, 2016.
[4] Brackett, Harold J. "Emergency management operations control system." Integrated
Communications, Navigation and Surveillance Conference, 2008. ICNS 2008. IEEE, 2008.
[5] Kurte, Kuldeep R., et al. "A spatio-temporal ontological model for flood disaster
monitoring." Geoscience and Remote Sensing Symposium (IGARSS), 2017 IEEE International.
IEEE, 2017.
[6] Zevenbergen, C., et al. "Challenges in urban flood management: travelling across spatial and
temporal scales." Journal of Flood Risk Management 1.2 (2008): 81-88.
[7] Amagsila, Gervy Andrew, et al. "A framework for mobile application of flood alert monitoring
system for vehicle users using Arduino device." Humanoid, Nanotechnology, Information
Technology, Communication and Control, Environment and Management (HNICEM), 2017 IEEE
9th International Conference on. IEEE, 2017.
49
[8] contributors, W. Android (operating system) — wikipedia, the free encyclopedia, 2018.
[Online; accessed 10-July-2018].
[9] contributors, W. Google maps — wikipedia, the free encyclopedia, 2018. [Online; accessed
10-July-2018].
[10] Schnebele, E., G. Cervone, and N. Waters. "Road assessment after flood events using non-
authoritative data." Natural Hazards and Earth System Sciences 14.4 (2014): 1007-1015.
[11] Suarez, Pablo, et al. "Impacts of flooding and climate change on urban transportation: A
systemwide performance assessment of the Boston Metro Area." Transportation Research Part
D: transport and environment 10.3 (2005): 231-244.
[12] Nakagawa, Anisha, and Ira Winder. "Hurricane evacuation traffic model." MIT
Undergraduate Research Technology Conference (URTC), 2016 IEEE. IEEE, 2016.
[13] Guzman, Cuadra, Villanueva, “Flood detector system using Arduino” International Journal
of Management and Applied Science, ISSN: 2394-7926 Volume-2, Issue-7, 2016
[14] Fabito, Bernie S., Francis F. Balahadia, and Jade Devin N. Cabatlao. "AppLERT: A mobile
application for incident and disaster notification for Metro Manila." Region 10 Symposium
(TENSYMP), 2016 IEEE. IEEE, 2016.
[15] contributors, W. Global positioning system — wikipedia, the free encyclopedia, 2018.
[Online; accessed 10-July-2018].