REAL TIME INTEGRATION OF FIELD DATA INTO A GIS PLATFORM FOR THE MANAGEMENT OF HYDROLOGICAL EMERGENCIES

: A wide series of events requires immediate availability of information and field data to be provided to decision-makers. An example is the necessity of quickly transferring the information acquired from monitoring and alerting sensors or the data of the reconnaissance of damage after a disastrous event to an Emergency Operations Center. To this purpose, we developed an integrated GIS and WebGIS system to dynamically create and populate via Web a database with spatial features. In particular, this work concerns the gathering and transmission of spatial data and related information to the desktop GIS so that they can be displayed and analyzed in real time to characterize the operational scenario and to decide the rescue interventions. As basic software, we used only free and open source: QuantumGIS and Grass as Desktop GIS, Map Server with PMapper application for the Web-Gis functionality and PostGreSQL/PostGIS as Data Base Management System (DBMS). The approach has been designed, developed and successfully tested in the management of GIS-based navigation of an autonomous robot, both to map its trajectories and to assign optimal paths. This paper presents the application of our system to a simulated hydrological event that could interest the province of Catania, in Sicily. In particular, assuming that more teams draw up an inventory of the damage, we highlight the benefits of real-time transmission of the information collected from the field to headquarters.


 INTRODUCTION
The scenarios occurring after natural disasters, especially on the occasion of exceptional rainfall events in unstable areas, determine a series of questions that require immediate and highly reliable responses to the operators of Civil Defense so the complex machinery of the emergency management can quickly start.Firstly, it is necessary to identify and circumscribe the damage on road infrastructures, required for all movements of men and equipment, and to determine the residual level of their functionality; at the same time it is necessary to know "if", "where" and "how much" people are in difficulty and, consequently, to establish the priority of the most immediate assistance.The analysis of the effects induced by calamities on the transport system clearly shows how the destruction or severe damage of even one element has serious consequences for all the territory.These include the impossibility to access the urban network, interruptions or overloading of part of the transport system or on other means of transport, delay in emergency services arriving to the scene of the calamity, etc..The examination of the transport system and its functionality is thus really important for a wider evaluation of the territorial risk (Condorelli, Mussumeci, 2010;Cafiso et al., 2005;Mussumeci, Cafiso et al., 2004;D'Andrea et al., 2001).Only by having a clear idea of the status of the road network and the general framework of the damage and of the people in difficulty, it is indeed possible to start successfully rescue operations.To get these answers, two possible actions can be undertaken: 1. starting mathematical simulations that can give probabilistic answers; 2. sending teams of surveyors to provide accurate and documented answers.
The two approaches are not mutually exclusive.On the contrary, they can be both usefully employed benefiting from the use of the geomatic technologies.Certainly, in the immediate aftermath of the event, the simulation of the probable scenario, based on the event magnitude and on the conditions of vulnerability and exposure of the territory, can support the decision process.The availability of a GIS platform aimed to the prediction and prevention of risk can support initial decisions on "where" and "how" to direct first aid.At the same time, it is anyway necessary to quickly start field surveys and send the information to the Operating Center.Even in this case, the availability of a GIS platform, suitable to acquire and process information from the field (Beni et al., 2007, Mostafavi et al., 2009, Famoso et al., 2012, Mangiameli et al., 2011b, Scianna, 2011), can be very useful to support decisions for the management of the rescue operations (Condorelli, Mussumeci, 2010).
Here we present a system that integrates GIS-Spatial DBMS-WebGIS architectures, based exclusively on free and open source technology, allowing to meet the needs of Civil Defense both in the forecasting/prevention of risk and in the operational phase of the emergency management.The work draws on various experiences carried out in about twenty years in the Department of Civil and Environmental Engineering of the University of Catania, before Institute of Roads Railways Airports, just in the design and implementation of Geographic Information Systems finalized to risk analysis and emergency management (Maugeri et al., 2010;Condorelli et al., 2007;Mussumeci et al., 2004;Cafiso et al., 2002;D'Andrea et al., 2001).

 GIS APPROACH FOR THE EVALUATION OF THE HYDROGEOLOGICAL RISK AND THE MANAGEMENT OF EMERGENCIES
The hydrogeological risk is typically assessed in relation to three hazard scenarios (figure 1): 1. landslides, which depend on the local specificity (lithology, land use, etc.) and the propensity of the soil to collapse; 2. flood, which depends on the volume of water predictable for different return period; 3. overflow, caused by the failure of levees, dams collapse or exceptional rain.The areas showing a high hazard can be identified even thanks to thermic and pluviometric data and to the inventory of collapsing structures.
The application of techniques of satellite remote sensing or the employ of direct aerial photogrammetry, also with Unmanned Aerial Systems (UAS), allows the recognition of the consequences of a calamitous event without any teams on the site for surveying.Thus, it is possible to supply in very short times to the Operational Center, all the geographic, territorial and environmental information that are fundamental for the coordination of the rescue teams, to help the affected population and put the territory under safety conditions.GIS applications could be also useful for the prevention planning of hydro-geological risk.The knowledge of geologic and lithologic cartography and of the most important mechanical parameter for soils makes possible to construct a slope map and to apply specific mathematical models to evaluate the security factor of slopes and, eventually, to calculate the expected displacements (Maugeri et al., 2010;Mussumeci, Condorelli et al., 2004).Another useful prevention activity is the inventory and the geometric survey of existing landslides in order to construct a GIS vector theme for useful overlaying with road network or built areas (D'Andrea et al., 2001).Many experiences in analyzing and forecasting risks have been conducted in the laboratory of Geomatics of DICA in recent years.We have investigated the conditions of risk for the infrastructures and for the exposed populations in may areas of Sicily, as in the province of Enna (Cafiso et al., 2002), Siracusa (Condorelli et al., 2007) and Catania (Condorelli, Mussumeci, 2010;Maugeri et al. 2010;Mussumeci, Cafiso et al., 2004;Mussumeci, Condorelli et al. 2004;D'Andrea et al., 2001) .
In particular, the implementation of simulation models in a proprietary GIS environment in all the territory of the province of Catania to estimate the hydrogeological risk due to exceptional rains or to the collapse of strategic dams, determined a series of scenarios for different return times (Cafiso et al., 2001).
In this work we propose the architecture of a specialized GIS platform, exclusively based on free and open source technologies, and its application in a simulated scenario due to exceptional rains and overflow of levees, which can determine floodings in large areas of the province of Catania.

The integrated GIS -DBMS -WebGIS platform for emergency management
For the emergency management, we developed a platform that allows the real-time acquisition of data collected in the field and the immediate construction of damage and exposure maps, through which interventions of the Civil Defense can be managed and differentiated.The application can be adopted in a wide series of events that require immediate availability of information and field data in a desktop GIS environment.The platform, already tested in the management of the navigation of autonomous robots and remote acquisition of the information collected in the field (Mangiameli et al., 2011, Mostafavi et al.,2012), is exclusively based on the integration of free and open source working environments that have been specifically customized for achieving the planned objectives.The Data Base Management System plays a central role both conceptually and structurally within the system.The information acquired in the field can be addressed to it remotely, over web or radio transmission, and populate the information base of the GIS.
The Web-GIS platform can be thus used to dynamically create and populate a database with spatial features thanks to the possibility of transferring in real-time to the operating center, the information related to the reconnaissance of damage consequently to calamitous events or the acquisitions from monitoring and alerting sensors (figure 5).
In particular, the GIS architecture is composed by:  a desktop GIS platform;  a Web-GIS platform;  a spatial database.
The desktop GIS platform (figure 3) has been developed using QGIS 1.8.0-Lisboa integrated with Grass 6.4.The Web-GIS platform has been constructed using Apache 2.2.10 as http server, MapServer 2.3.1 as geoserver, and PMapper for the Web-GIS graphic and tools (Famoso et al., 2012).We also used the OpenLayers platform, which is an open source javascript library to load, display and render maps on web pages, with no server-side dependencies, from multiple sources, like the public administrations Web Map Service (WMS) or Web Feature Service (WFS) and the commercial Google, Bing or OpenStreet maps.Thus OpenLayers can be seen as a rich source of geographic information, very efficient in terms of speed of acquisition and exploration of the data (Pirotti et al., 2011).
The platform has been customized by integrating the following features: -customization of the graphics; -customization of the zoom functionality; in particular, a zoom to full extension was inserted between the slider and the zoom navigator; -a JavaScript/PHP application was implemented to digitize geometric primitives (points, lines and polylines) on the raster supports available in the WebGIS platform that can be managed as vector layers.
The spatial database has been developed using PostgreSQL with the PostGIS geographic extension that allows the creation and management of geodatabase perfectly connectable to GIS platforms, both desktop and Web-GIS side.
The basic structure has been modified by customizing and optimizing some aspects of the platform using different programming languages, such as PHP, HTML, SQL, and PHTML.The principal actions regard the augmentation of functionality and performance of the standard WebGIS environment, as: -dynamic access to the database to upgrade and view the information; -generation of the characterizing parameters of the spatial data; -enjoyment of the cartographic Web services (WMS, WFS, etc..); -utilization of the query builder into the WebGIS; -improvement of the performance of the editing and printing tools.
The most important aspect is the ability to remotely populate the geographical database, over the Web or radio link, and to make the data immediately available on the Desktop GIS to be processed and possibly to generate new vectorial themes.On the other hand, the platform allows to call up and display spatial data directly from the database.
Figure 3. Architecture of the integrated GIS platform

Database Structure
The DBMS used is PostgreSql with the geographical extension PostGIS that allows the creation of Geodatabase.This platform is available as free and open source technology and uses pgAdmin III as the user interface for the design, management and administration of the database.
To create a new geographic database inside the DBMS, it is necessary to create a "geometric" table to host, in addition to descriptive attributes, the positioning data observed in the field.Preliminarily, the spatial characteristics of the data should be clarified to make automatic and immediate the position on the cartographic reference.To this end, the geographical table, called "LatLong" in the developed and tested application, is characterized by a column "geom" that encloses, in an alphanumeric string generated with a PostGIS algorithm, the information related to the geometry associated to the data (point, line, polyline, ...), the spatial reference system and the number of spatial dimensions.
In particular, the geographic referencing system is entered with a numerical code called SRID (Spatial Reference System Identifier) available in the table "spatial_ref_sys" present within the spatial extension PostGIS.
The table as a whole contains an "id" attribute with the primary key constraint that uniquely identifies each record and the associate latitude, longitude, column "geom" and every descriptive attributes (figure 4).

Dynamic data entry by Web
After the definition of the structure of the DB and the creation of the geometric table to host the spatial data, we inserted and updated in real time the data collected remotely.First, we developed and implemented an original procedure that allows the direct connection to the online database and to enter the coordinates acquired in the field into a form specially built in PHTML (Mangiameli et al., 2012).Once compiled the input mask, the item was properly georeferenced and made visible on a cartographic basis for immediately use in the GIS.
To transfer, in real-or near real-time, the data acquired in the field to the GeoDB, we developed a software application integrating three programming languages (PHP, SQL, PHTML), in order to import into the geometric table the entire listings of points acquired with GPS/GNSS receivers (figure 5).We remind that the php is a language that allows running command scripts on the database and well integrates with the html language to generate dynamic graphical interface.With our developed PHP code, it is possible to: -open the connection to the spatial database and visualize its status; -upload data into the database; -generate the alphanumeric string that define the spatial position of surveyed points; -close the connection to the spatial database.In this way the access to the DataBase can be controlled (Pirotti et al., 2011), authenticating the users and assigning, for different types, the actions they can perform on the data.The connection status is reported to the user via the message "connected" or "connection failed".Insertion of data into the columns of the table is made using the SQL INSERT command, executable inside the php code, giving the name of the table and taking the geometric data from the text-box compiled in the input phase or from acquired files of coordinates.
In order to verify the correct insertion of the geometric data in the table, the developed PHP code includes a check on the proper execution of the SQL INSERT command and the result is displayed to the user through a video message "Keyed in coordinates" or "insertion failed".The input procedure generates in the geometric table an alphanumeric string that associates a unique geometry in space to each record.
To prevent uncontrolled access at the end of the work session, a "disconnect" command from the DB was added in PHP code.The command is automatically activated at the end of each stage of data entry and closes the connection to the DB, avoiding that the session remains unintentionally open and exposed to risks.
The user interface has been built in PHTML and can be accessed through the tools menu by a connection specially created in the WebGIS platform.In summary, a HTML page has been structured, whose title is "insert date", and where the call to PHP and the text-boxes for the data input via Web are available.A specific form has been designed to link the text-boxes to the SQL commands inside the executable PHP code.To close the data entry and start the automatic generation of the geometric table, the command "APPLY" was created.
To remotely use the software architecture, a WebGIS platform has been developed with the use of only free ed open source technologies: -Apache 2.2.10, as http server; -MapServer 2.3.1, as geoserver; -PMapper, as WebGIS application.
The Web page has been customized with regard to the graphical layout and functionality, importing and integrating at software level plugins and tools of interest.It displays: -a view (map area) in the center; -a legend of layers at the top right; -a reference map at the bottom right; -a vertical toolbar containing typical navigation tools (zoom in, zoom out, pan, etc..) and advanced query (Identify, Select, etc.) at the right of the map area; -a dropdown menu with print, download and data entry functionality.
The operator working on the field can select "Go to the DB" inside the menu and a Web page is available to upload new geographic records in the "LatLong" table.By the selection of the layer "GPS points from field" on the Web GIS legend, the new points are immediately referred to the geographic system and displayed on the video.The table can be dynamically populated with all data acquired on site and the operator at the control station can import that information on his QGIS desktop platform by the "Add PostGIS layer" tool.

 THE CASE STUDY
This work concerns, under the hypothesis of a flooding event in the lowland of Catania (Italy), the management of the interventions on field, for which a real-time acquisition of information is required in order to characterize the operational scenario and to determine the critical areas, the priority of intervention and the optimal paths to reach people in difficulty.The first step was to overlay the map of hazard on a current cartography or other geographic support (satellite images, orthophotos, DTM, ..) to check for interference of the scenario with the road infrastructures and the houses, especially those sparse, which could determine dangerous conditions of isolation for people.
To this end, using QGIS 1.8.0-Lisboa as Desktop GIS and its plugin OpenLayers, we have quickly imported the Bing Aerial with label and the Google physical maps as basic geographic support (figure 6).By superimposing the hazard map over the geographic image, we identified the numerous situations of potential risk for the road network and for a lot of isolated buildings (figure 7).To this aim, it is possible to assume that various resources and technologies can be employed on the area affected by the event, ranging from teams of rescuers/detectors to means of transport by land or air, from amphibians to drones (figure 8).
Figure 8. Scheme of the architecture In any case, each information is related to a spatial reference, which is always accompanied by strings of coordinates generally acquired with satellite positioning technologies, nowadays highly accurate thanks to RTK or NRTK facility (Dardanelli et al., 2009;Namie et al., 2008).Hence it is needed to acquire the information of "position" into the database and any other information related to that position, which can be a form of damage compiled in the field or an image shot on site.We suppose that the operators of civil protection are equipped with GPS receivers and send via radio their position as NMEA strings to the spatial DB through the WebGIS platform.The information becomes immediately available on the Desktop GIS platform at a remote location, implementing an effective link "Field-Operations Center."This latter can thus receive in real time every information related to the team movements and to the territorial criticality to compose step by step, but without delay, the post event scenario.The platform, successfully tested using an autonomous robot, import the tracking data of each team or mobile means sent to the field, the coordinates of points of interest (isolated houses with people in need, blocked roads, ...), the perimeter of flooded areas, and transfer information to the GeoDB, associating any acquired information (forms of damage detected, photographic images, ..) to its exact location to be immediately usable and analyzable on the DesktopGIS platform of the Operations Center.

CONCLUSIONS
We presented a platform that allows generating and populating a spatial DB from a remote station, by means of a dedicated WebGIS application that integrates functionalities for data management typical of the DesktopGIS environment.On the other hand, via Web data can be accessed with a direct connection to the DB, without necessarily importing a shapefile previously generated and saved in the desktop environment.
The application is useful when it is necessary to transfer information in short times from the field to an operations center to be rapidly examined.This requirement is typical of the Operations Centre for the territorial emergency management.Its satisfaction can significantly reduce the time of acquisition of information from areas involved and can certainly help optimizing the use of men and available means to provide emergency assistance to affected populations.

Figure 2 .
Figure 2. Simulated scenario of flooding in the province of Catania (D'Andrea et al., 2001)

Figure 4 .
Figure 4. Structure of the spatial DB

Figure 5 .
Figure 5. Transfer of GPS coordinates into the DBMS The connection to the database is set using a php command that contains User, Password and DB name.The connection takes advantage of the privacy and sharing properties of the DBMS.In this way the access to the DataBase can be controlled(Pirotti  et al., 2011), authenticating the users and assigning, for different types, the actions they can perform on the data.The connection status is reported to the user via the message "connected" or "connection failed".Insertion of data into the columns of the table is made using the SQL INSERT command, executable inside the php code, giving the name of the table and taking the geometric data from the text-box compiled in the input phase or from acquired files of coordinates.In order to verify the correct insertion of the geometric data in the table, the developed PHP code includes a check on the proper execution of the SQL INSERT command and the result is displayed to the user through a video message "Keyed in coordinates" or "insertion failed".The input procedure generates in the geometric table an alphanumeric string that associates a unique geometry in space to each record.To prevent uncontrolled access at the end of the work session, a "disconnect" command from the DB was added in PHP code.The command is automatically activated at the end of each stage of data entry and closes the connection to the DB, avoiding that the session remains unintentionally open and exposed to risks.

Figure 6 .
Figure 6.Simulated scenario of flooding in GIS environment to individuate the potential condition of risk for people and infrastructures This simulated scenario can usefully support both the planning of the first interventions and the sending of inspectors and surveyors to acquire true information on site and optimize the emergency management in the first hours after a calamity.

Figure 7 .
Figure 7. Potential risk for isolated buildings related to the predictable flooding scenario.