A Sensor Web for Real-Time Groundwater Data Monitoring in Morocco

This article presents research and development of an interoperable platform to facilitate, monitor and coordinate groundwater data sharing. This system was orchestrated by a number of services described by Open Geospatial Consortium (OGC) such as Sensor Observation Service (SOS) and other services for the use of mapping data, Web Feature Services (WFS), Web Map Service (WMS), and catalogue services (CSW). An important activity for our project was the establishment of a portal for geographic data and services. Geoportal developed for this project will promote and facilitate access to groundwater data and share theme more openly. Otherwise our system has been designed to provide a powerful tool that enhances the ability of regional staff to monitor near real-time groundwater data ( i.e. piezometric level) and as a result will help provide a more effective response to environmental upsets.


Introduction
The impact of human activities development on the natural resources is increasingly important and influences in a straightforward manner the availability of these resources on a global scale [1] [2].Water is one of the most vulnerable natural resources to these changes.It is therefore necessary to implement a strategy for a sustainable management of this resource.
Several initiatives, meetings and publications have addressed this problem, such as the Dublin Conference on Water in 1992, the European initiative EUWI and various reports prepared by UNESCO and other UN working groups, including the report of the UN-Water Task Force [3], which provides a dashboard with a series of quantitative and qualitative indicators, and this table can be used to give a better insight for the policy makers in water resources management.
In Morocco, the hydrological context was for years considered quite positive, but this favorable situation is no longer the same since the years of drought.In addition to these dramatic years, there is the impact of the urbanization rate which has reached 51.4% in 1994 [4].Another factor affecting this situation is the continuous growth of the population, which was estimated in 2004 at more than 29 million inhabitants [5] and which in 2014 exceeded the threshold of 33 million inhabitants (http://www.hcp.ma/).
To face these challenges, Morocco has established in 2009 the National Water Strategy.The purpose of this strategy is to ensure an integrated and effective management of this vital resource.Among the six sections that constitute this strategy, there is the National Information System of Water, which is considered as a supportive process and an accompaniment tool of all action plans meant for the development of this sector.Within this section, modernizing the sensor network is one of the basic steps for the implementation of the National Water Information System.To illustrate the importance of this step.An estimated budget of 5 Billion dirhams (~500 Million Euros) has been allocated for the project of modernizing the networks of measurement (6% of the overall cost, estimated at 82 bn DH for the implementation of the water strategy).
In order to operationally implement this strategy, the Integrated Management of Water Resources Support Program (AGIRE-Appuie à la Gestion Intégrée des Ressourcesen Eau) has been created.It is a program developed in the Department of Water Research and Planning (DRPE) out of a partnership between Morocco and Germany (http://www.agire-maroc.org).This program has identified at the SGI-Rabat Workshop in 2012 the steps to modernize the measurement network; in a first place, there should be a generalization of the acquisition and the use of sensor; in a second step, an automatization of the input of the data processed is required; finally, equip the sensors with remote transmission of measurement data.At this workshop, an inventory of fixtures has been drawn up [6], with the following observation: among the 128 automatic recording sensors on the 8 HBA (Hydraulic Basin Agency), 46% are equipped with means for remote transmission.
These sensors of automatic recording equipped with a telemetering system allow us to use real-time information to better manage and monitor the level of shallow and deep ground waters.The use of the DEMASole software [7], suitable for the hardware for data transfer to central (DRPE) has been identified as one of the actions to upgrade the network of measurement [8].The DEMASole, exports the data obtained (groundwater level, temperature, conductivity) in text format; these data are then used to manually extract graphs and dashboards with appropriate indicators.
On the other hand, for the National Water Strategy (NWS), one of the objectives is to enable access to water data to the public.Furthermore, all international partners require access to these data, and among these partners, we find donors that accompany Morocco in its efforts to implement NWS measures (European Union, World Bank).Therefore it is an obligation for Morocco to have the tools for regular exchange of data, according to the international standards.
Thus the purpose of this article is to provide an open source solution compliant with the international standards for the exchange and use of geospatial data in real time by means of a sensor network.This solution will be complementary to the current system and will allow the improvement at lower cost.
In the following sections, we will introduce an overview of some international experiences of Water Information System according to OGC standards, while incorporating a component for the ascending of measurements information in real-time from a sensor network, and then we will present an inventory of the open source and free solutions, a comparative performance of this solutions and an overview of scientific researches using these tools.At the end, we present our solution, its architecture and its operating mode, and discussing in the results obtained from the use of this framework in a particular region of Morocco that constitute our study case: Ziz-Rheris.

International Experiences
There are many information portals that provide services for mapping and cataloging data on water resources for a particular region, but only a limited number of this portal provide access to real-time data from measuring stations.Below we give some examples of geographic areas: In America: In USA: USGS NWIS, National Water Information System, with its real-time component.
(http://waterdata.usgs.gov/nwis/rt),allows viewing a web mapping, data is recorded at a highly regular frequency from 15 to 60 minutes, and transmitted every 1 to 4 hours.
In Europe: Switzerland: Hydrodaten (http://www.hydrodaten.admin.ch) is the information portal of the Federal Office for the Environment, which provides for public, a large number of features: database, maps, modules and templates.For this, the Office has a maps of the locations of measurement stations in real time (water flow, groundwater level, temperature, forecast, conductivity etc.), along with charts and graphs.
In Australia: waterinfo.nsw(http://waterinfo.nsw.gov.au) is the portal for water information in Australia, its data come from several government agencies, and involves both surface water and groundwater, its real time component (http://realtimedata.water.nsw.gov.au/water.stm)allows visualizing on base map real-time measures of water levels and flow rate, as well as groundwater level and electrical conductivity.
During our research we noticed that in the African continent such portals for the general public do not exist.
In addition to these portals, at international scale, several research projects have focused on the possible uses of data provided by sensor networks to develop softwares that will improve the management of these networks.One of the examples is the "Sensor Web-WSV" network of hydrological sensors [9] solution in Germany.
Integrating the concept of water ontology [10]- [12] is one of the scientific approaches that use the notion of hydrological metadata for a cataloging service data coupled with a service-oriented architecture, which provides data accessibility for users with the most effective method to find water data, and especially those observed by sensors.
Also, one of the international academic works in this area is the American university group open source CUAHSI (http://his.cuahsi.org)solution combining both the modeling system CSDMS "Community Living Dynamics Modeling System" and HIS "Hydrological Information System" [13].This system implements web services and the standards of the OpenGIS OGC SOS (Sensor Observation Service) [14], using the possibilities offered by the XML diagram of standard WaterML [15] thereby ensuring the interoperability with the modeling system CSDMS.
The use of service-oriented architecture concepts associated with the following OGC SWE standards is applied in several areas that are either directly or indirectly related to water resources [16], for example, in agriculture with the works on decision making support system applied to irrigation in China [17], or those for the visualization of data observed by the sensors of the Kubicek team [18].Also, the works are in relation to flood risk management in Thailand, using RADARSAT and MODIS with the environmental "Web Sensors" [19].Other areas exploit the notion of "Web Sensoring" for ascending real time data in areas linked to alerting risks of fire like [20]; and more recently Díaz [21] who uses free and open source software.
Other works and research projects exist and they are always evolving.This proves the value of such tools for the public user and also their great efficiency for professionals and decision makers.
We gave this overview to support the objectives of this article, which are based on a solution designed on a service-oriented architecture and using open source and free tools, in conformity with international standards.

SOS Software
According to literature references on OGC SWE standards and Mike Botts initiative [22], we define a sensor network as a set of nodes distributed in space, and whose main function is to monitor various phenomena with web sensor as the access mechanism via the internet, to the sensor network and the archived data, such as noise, temperature, vibration and pressure.These data can be explored using a series of protocols and application interfaces (APIs).In this section we present three open source and free softwares (Map Server SOS, Deegree SOS and 52˚ North SOS), implementing the following OGC SWE of initiative standards (Sensor Web Enablement).
Comparison between the different SOS servers' performance has initially started through works on SOS and other OGC standards for data publishing [23] [24].However, these performance comparisons between different SOS servers have emerged later in 2010 during FOSS4G meetings [25] comparing the three servers 52˚ North, Deegree and MapServer.
These works and other recent studies [26]- [28] have come to the same conclusion that Deegree SOS has the fastest response time independently of the volume of the data processed.Indeed, "Deegree SOS" is suitable for more complex situations, whereas "52˚ North" is more suited for average data volumes.On the other hand, "MapServer SOS" is only suitable for the treatment of small data volumes.
However, since the maintenance of the Deegree SOS server was abandoned by the Deegree Community [29], we have chosen not to develop our work on it.
We have opted for a combined solution, connecting between the 52˚ North SOS server, a geoportal and a geocatalogue of the "Deegree" family to offer a modular solution for the user, including several services.

Materials and Methods
In this section we will discuss the methodology for the establishing of an open source solution and the implan tation of the SOS standard for the case of our study area: it is the 52˚ North SOS [30] and [31].

Tafilale Plains
Data of groundwater level measurements and conductivity used to implement our solution by integrating the SOS standard concerns one of the most important parts of Eastern Morocco: Tafilalet.The description of this plain (described on: www.water.gov.ma)indicates that it has a particular morphological feature, including four major watersheds: ZizGuir, Rheris and Maider, oriented North-South [32] [33] The choice of the area belonging to the Hydraulic Basin Agency Guir-Ghris-Ziz, is justified by the following reasons: • 1st reason: Until 2014, this HBA still does not have its own website, like other HBA of Morocco; list of HBA websites in morocco goes as follow: HBASebu, http://www.abhsebou.ma,HBATensift, http://www.eau-tensift.net,HBA OumErbia, http://www.abhoer.ma,HBASouss Massa, http://www.abhsm.ma,HBAMoulouya, http://www.abhm.ma,and HBABouregreg, http://www.abhbc.com.
For this reason, we propose a free and open source solution, allowing the visualization of data over a web interface, accessible to the public.• 2nd reason: The importance and the role of groundwater for socio-economic development of this region [34], from which emanates the significance of the contribution that a tool for recovery and real-time monitoring measurements of groundwater level.• 3rd reason: The disturbing findings on groundwater quality in the area, published in the report entitled "The State of the quality of water resources in Morocco from 2002 to 2008" [35], informs us that the average overall quality evolves negatively, which is an important motivation for the real-time monitoring of quality indicators (e.g.conductivity) for this region with more than 2 million inhabitants (more than 7% of the Moroccan population) according to the last census in 2004 [5].• 4th reason: This area is at the heart of several projects conducted within international organizations (GTZ, JICA, FAO, UN), which requires the respect of recognized standards for the exchange of geospatial data.
In regards to these elements, this region can be considered as a pilot case for the implementation of open source "Web sensoring" solutions, which can supplement the existing official device.The following section will give more details on the overall architecture of the technical point of view, with an overview of the implementation of the chosen solution steps.

Overall Architecture
Server 52˚ North SOS: the central element of our architecture, it works around a Java Framework called "OGC Web Service Access Framework (OX-Framework)", according to Bröring team [36] [37] which allows the integration of data from different sources and in different formats, while ensuring accessibility to geospatial web service.The goal sought by the development of this Framework is to build flexible architectures.The deployment of this solution is possible on a servlet container JSP, Apache Tomcat.
Before the setup phase of the SOS server, a first step is to prepare the PostGIS database [38].Indeed, the configuration files of 52˚ North, contain a large number of parameters to initialize for the proper functioning of SOS service.Data on the monitored phenomena by sensor networks can be transmitted directly via communication networks (WiFi, GSM, Net), or stored in a file then imported into the PostGIS database file.It is this scenario that has been adopted since that 52˚ North includes a data import tool "Import-SOS" [39].This tool identifies measures on the monitored phenomenon, the date and time of measurement, the unit of measurement, the sensor name and the geographical position.Then "Import-SOS" imports the data and feeds to the tables created in the preliminary stage.
The data (piezometric level and conductivity) are taken from the literature and documentary background that accompanies each project or study in a given area.These reports are available in the Department of Research and Planning of Water and the research works for the team at the Laboratory of Applied Geoscience, University Mohamed I-Oujda [40] who conducted measurement campaigns recently in the region.
The SOS-client, allows access to the data recovered by the sensors via a web service SOS "Sensor Observation Service" on a web interface for the user.This allows visualizing these measures over time in graph format, and exporting the results in different formats (PDF, Image, XML).At the end of these steps, the client's URL SOS can either be linked to the Geoportal and/or documented on a geocatalog, so that at last he gets a more comprehensive solution that includes all the elements to facilitate accessibility, visualization and organization of the geo-spatial data.This result is possible through the data stored in the attribute tables published on a map server (via web services WMS and WFS) and also the data stored and used by the metadata cataloging service CSW.
The Figure 1 summarizes, present the overall architecture, which includes the various systems used to build a modular solution, open source and compliant with OGC standards, we will find the user interfaces (Geoportal, Client-SOS, Geocatalog) with the servers WMS, WFS, SOS and CSW associated with different modules (metadata editor), as well as PostGIS database with the "Import-SOS" module.
The next section presents in detail the results obtained by implementing a set of OGC Web Services, using open source and free tools for real-time monitoring.

Results
In this section we detail the results obtained after the integration of data on the selected study area, using the 52˚ North SOS Framework.
Two indicators were selected for the visualization of the results: • The groundwater level, which allows for a quantitative overview of the groundwater level; this is important information to be taken into consideration in reporting and summarizing periodically by the organizations operating in this area.• The conductivity is one of the quality indicators taken into account in the evaluation of the quality of the water system.Indeed, the Decree 1275-1201 of 17 October 2002 [41], sets the grid for the quality of surface water and groundwater and thus determines the intervals associated with the qualification.

SOS Client in the Geoportal
After the establishment of an SOS server, the user SOS interface and the publication of these data on a Deegree geoportal [42] (through editing the stations layer's attribute measurements data with the GIS Desktop tool): Qgis V1.8 [43] adds the URL of the SOS client.Then at the geoportal, we can simply generate a "Get Feature Info" request to the WMS deegree server [44] on the selected station (Figure 2). Figure 3 shows the history of piezometric measurements on a graph generated by the Plot SOS library for the station "AvalBge H.A" of Ziz-Rheris station area, according to existing data recovered on the period from March to April 2014, to simulate the results.
This same result can be conceived to check the electrical conductivity, shown in Figure 4. Using these two graphs, the user can have a read on the quantitative and qualitative status of water resources    (the piezometric and conductivities) from the measuring station.To further facilitate the consultation of these data, we will describe in the next paragraph, the established link between the "Client-SOS" with geocatalog interface, to provide a complete and homogeneous solution for the same study area.

CSW Geocatalog and SOS Interface
By filling in the information about the URL (Description, Date Created, Date updated, produced data) by the metadata publisher of the CSW Deegree, we can see this URL via the CSW search interface catalog Manager (Figure 5).After this last step, we can both read the data reported in real time from the measuring station, and also access geospatial data from the geoportal, or simply obtain documents related to the study area (PDF, DOC, Image, ZIP).This is an important way to organize data and enhance accessibility.

Discussion
In this article we were able to prove the importance of the use of open source tools with OGC standards for the measurements data recovery in real-time for better control, monitor and predict groundwater resources.
The proposed solution perfectly integrates the system implemented by the government in charge of the management of water resources in Morocco.At the end of its operating cycle, this remote measuring device generates measures in text format, which can easily feed our proposed solution and thereby achieve automation of all treatments until the posting online of the results.As see in top, the existing solution requires manual processing to obtain graphs and indicators based on the data reported by the telemetry device in place using the GSM network instead of the Internet.
In Morocco, the "IMPETUS Atlas of Morocco" [45] is a research reference in the field of decision-making support for a sustainable management of water resources (http://www.impetus.uni-koeln.de/iida).This project made possible by the support of Morocco's international partners and mobilizing a large number of research teams, it aims at providing policy makers with information and resources to allow them a more effective decision-making, taking into account a large number factors (climate, availability of resources, Health, Society).One of the IMPETUS components is the use of an open source solution for cataloging data on water resources "Geo Network" (http://geonetwork-opensource.org), however, according to the literature, it does not include a real time follow up solution of key performance indicators, which is considered an a value-added of the endeavor of this article.
This article is a continuation of this work, and proposes a solution incorporating a Geoportal, a geocatalog and also the means to monitor in real time and the measures fed back by the sensor array in place.All these solutions are open source and comply with international standards in the field.
The international status of Morocco is forcing them to adopt a policy of openness and exchange of data, which involves the use of international norms and standards.The main partners of Morocco have established rules governing the exchange of information, starting with Article 19 of the Universal Declaration of Human Rights and the European Convention on the Aarhus Convention [46], and as recently as 2013, the U.S. initiative for Open Data and Open Government initiative (http://opengovernmentdata.org/).
In this international context, Morocco has introduced in its newly adopted constitution in 2011, the Article 27, which entitles every citizen the right to public information.And in 2013, Morocco has prepared a new version of draft Law No. 13/31 on the right of access to information [47], which establishes procedures for requesting information held by public authorities, but not explicating the way of recovering information by the said authorities who meant to have the information requested by citizens.In this context, we note the importance of establishing mechanisms to provide public information in real time.
Among planned future works to continue current efforts, launching an initiative called "Community Initiative for Exchanging Water Data" which will include the results of this research, for the development of a public online portal, especially for the scientific community, to share water data.
Also, a performance test of this solution coupled to the current telemetry is among the future perspectives for this work.Certainly we have used data from a number of available documentary backgrounds, but it's more interest to do an operational check of performance with the data reported directly by the sensor network with automatic recording, deployed at the National level.

Conclusion
The main purpose of this article is to provide a lower-cost solution, compliant with international standards, open source and integrating the current device, allowing the providing of data on the measures of the level and quality of groundwater.The use of 52˚ North, associated with a Deegree geoportal and geocatalog, to build a solution with a SOA made it possible to achieve the overall objective of this work.Recovery and provision of data on groundwater resources of a particular region enable greater responsiveness for managers and an important implication by the population of this region.This work is part of the dynamic changes taking place in Morocco, since the adoption of the Strategy for Water in 2009 until the edition, in 2013, the draft of the law to free access to public information.

Figure 2 .
Figure 2. "Get Feature Info" request on the station "AvalBge H.A" the URL field contains the link to the SOS-Plot interface for displaying graphs.

Figure 3 .
Figure 3. Overview of the piezometric level recovered from the "AvalBbe H.A" of the "Ziz-Rheris" station area on the geoportal.

Figure 4 .
Figure 4. Overview of the electrical conductivity recovered from the "AvalBbe H.A" of the "Ziz-Rheris" station area on the geoportal.

Figure 5 .
Figure 5. Connection between the geocatalogue and the web client interface SOS "example of AMJOUJ station".