Content uploaded by Fernando Martínez Alzamora
Author content
All content in this area was uploaded by Fernando Martínez Alzamora on Oct 01, 2019
Content may be subject to copyright.
17th International Computing & Control for the Water Industry Conference
1-4 September 2019, Exeter, United Kingdom
Upgrade of the GISRed application for the free analysis of WDN
under GIS environment
Martínez Alzamora, F.1 , Lerma, N.2, Bartolin, H.3, Vegas Niño, O.T.4
1,2,4 Research Institute of Water and Environmental Engineering (IIAMA). Universitat Politècnica de València. 46022
3 Senior Specialist. Hydraulic Modeling System. DEWA, PO Box 564, Dubai (UAE)
1 fmartine@hma.upv.es (corresponding author)
Keywords: WDS, GIS, EPANET, Hydraulic Models, QGIS
EXTENDED ABSTRACT
Introduction
Since USEPA launched EPANET 2.0 in year 2000 [1] there has been no other powerful free access software to analyse
hydraulic networks. By 2008, EPANET code was released into a public domain through
https://github.com/OpenWaterAnalytics/EPANET repository. Ever since, the Toolkit has been improved by fixing bugs,
extending the API functionality, boosting computing efficiency and providing new capabilities such as leakage
management or pressure dependent demands. On the other hand, some researchers have improved the EPANET GUI
with the aim of geo-referencing elements, interpolating elevations, sizing pipes, adding irrigation components or even
generating networks randomly.
Currently, most modelling software packages allow the user to include auxiliary network elements. Besides
traditional components (i.e. pipes, tanks, reservoirs, pumps, automatic valves and demand nodes), models may
include other equally important components for the daily tasks, such as shut-off valves, boundary valves,
fire hydrants, irrigation intakes, washouts and air release valves, house connections, level meters, pressure gauges, flow
meters, etc. All these elements are available in the utilities GIS systems, but rarely take part in the models.
Nevertheless, they should be considered for many purposes such as development of quality models, leaks location, asset
management and other issues concerning the quality of the service offered to customers.
The first attempts by USEPA to connect EPANET with corporate databases, and particularly with GIS systems (or
previously with CAD systems), were initially aborted by commercial companies. Later on, other developers produced
plugins to integrate EPANET into commercial or free GIS, for example ArcGIS, QGIS or gvSIG. Some of these plugins
are very limited, only allowing to import/export the INP file [6], while others can perform simulations and even
optimize pipe diameters [7]. The most advanced one [8], allows to edit the whole data in order to set up an EPANET
scenario from a GIS environment. However, it does not offer tools to allocate demands, consider the complementary
elements, or provide additional capabilities, apart from those to run the model and show some simulation results.
GISRed [2], [3], [4], released in 2004, was the first free software extension enabling seamless integration with a GIS by
emulating the graphical interface of EPANET on a geographical background, as well as managing some
complementary network elements. GISRed added functionality to facilitate the model building process, such as
importing data from CAD, GIS layers or EPANET INP files, error detection tools, interpolation of elevations, demand
allocation, topological analysis, sectorization assistants, etc. However, the code was written in Avenue, a proprietary
language of ArcView 3.2, which was no longer supported by the new ArcGIS versions.
This is why authors are currently making a major effort to rewrite the GISRed code by using native language embedded
with other proprietary environments. That will allow users to enjoy again this powerful tool to build and manage
hydraulic models from a GIS environment for free. The purpose of this communication is to show the new version of
GISRed that is being developed, adapted to the new platforms.
Methods and Materials
The new version of GISRed is being developed in C# under the Visual Studio environment. Data model is structured on
basic classes harbouring all data supported by version 2.1 of the EPANET Toolkit, and some extended classes housing
all complementary elements described above, which affect to the network operations in detail.
Data model recognizes the node-link duality for modelling pumps and valves, which are considered points in a GIS and
links in hydraulic models. Also, a relational data model was designed in parallel to browse and edit the different
elements by layers under a GIS environment. Geospatial layers (i.e. pipes, valves, hydrants or house connections, etc)
17th International Computing & Control for the Water Industry Conference
1-4 September 2019, Exeter, United Kingdom
are managed as themes, whereas alphanumeric layers (i.e. patterns, control rules, default values or options, etc) are
managed as tables.
Every time users edit any layer by GIS tools, all topological relationships are rebuilt to maintain the model integrity,
using highly efficient spatial analysis algorithms transparent to the user and fully developed by the authors from scratch.
For example, rebuild the arc-node topology takes less than one second for a network of 100,000 nodes, with nodes
created at pipe endpoints if necessary. During this task a powerful error checker informs about unconnected segments,
duplicated elements, components out of line, pipes to be split, etc.
An important capability of the new version of GISRed is the management of all the complementary elements previously
mentioned which optionally can become part of the model. For example, the house connections may be automatically
added as nodes or as links, hydrants and washouts can be considered as demand nodes with one or more outlets, manual
valves are automatically linked to the pipelines they fall on to determine its status, and measuring elements are
associated with the nearest pipes o nodes, depending on the meter nature, thus linking field data with the corresponding
hydraulic variables.
Moreover, the new version of GISRed includes all former features, some of them very powerful like the project
manager, data importer from other sources apart from the INP file (CAD files or external shapes); editors of any data
including patterns, curves and control rules; elevation interpolation from DEM files or from the nearby nodes; nodal
demands allocation from records grouped by connections, streets or polygons; topological analyser to identify isolated
segments, detection of bottlenecks, assistance in sectorization tasks, etc.
Model data can now be exported to INP format or run it directly by connecting to either the EPANET Toolkit 2.1 or a
more efficient library named Loopnet [9] developed in our research group. Finally, all results can be shown in the same
GIS environment, using either static or dynamic maps, tables, time graphs, contours or head profiles.
It must be also emphasized that the new GISRed application has been designed to work under different environments in
a compatible way, so that the user can perform simulations of the same network through different GIS platforms or
through a standalone and more usable desktop GISRed application.
Figure 1. The new interface of GISRed working on QGIS. The project manager, and dialogs to create a new project or
import an INP file
17th International Computing & Control for the Water Industry Conference
1-4 September 2019, Exeter, United Kingdom
Results and Discussion
Some functionality is already available on QGIS by means of a new plugin. These include loading any INP file into the
data model, exporting it to shape and CSV files according to the relational model, and showing the layers on the
map (Figure 1). The basic layers supported by EPANET can be extended with new layers to host the
complementary elements. All layers can be edited using the QGIS tools or specific GISRed tools and exported to create
a new INP file. The project manager window allows to manage different networks or scenarios and to alternate their
visualization on the QGIS canvas.
The current capabilities of the new GISRed application will be completed soon to recreate all features of the former
application. An unprecedented free-of-charge GIS-based hydraulic modelling simulation tool with professional features
will be available capable of working as a standalone application or seamlessly integrated within QGIS or other GIS
platforms.
A beta version of the latest version of QGISRed plugin can be downloaded from the GitHub repository
https://github.com/neslerel/QGISRed , including the user manuals in Spanish and English. It can also be installed
directly from the plugin manager of the main menu of QGIS.
Conclusions
Computer science advances in all fields, from the hydraulic analysis to the GIS tools capable of managing all WDN
components, allow us to extensively develop hydraulic models very close to the reality. However, there was a lack of
public applications to manage such amount of information in a flexible and easy way. The new GISRed application
comes out to bridge the gap and establish a new standard to build and manage network models in the future, without
any limits in the model size.
REFERENCES
[1] Rossman L. A. (2000) “EPANET 2 User’s Manual”. Water Supply and Water Resources Division, US
Environment Protection Agency
[2] Martínez, F.; Bartolín, H., Monterde, N. “Connecting ArcView 3.2 to EPANET2. A full environment to
manage water distribution systems using models”, Water Software Systems: theory and application. Vol. 2, pp
355-368, Ed. B. Ulanicki, B. Coulbeck, J. Rance. Research Studies Press, 2001
[3] Bartolín, H., Martínez, F., “Modelling and Calibration of Water Distribution Systems. A new GIS approach”,
33th ESRI International User Conference 2003, San Diego (EEUU), July 2003
[4] Martínez, F.; Bartolín, H., “GISRed 1.0, a GIS-based Tool for Water Distribution Models for Master Plans”,
Effective Modeling of Urban Water Systems. Monograph 13, pp 79-92. Ed. W. James et al. Publ. CHI.
Guelph, Ontario (Canadá). 2005
[5] QGIS Team. “QGIS. A Free and Open Source Geographic Information System” Available
https://www.qgis.org/en/site/ date accessed Apr 2019
[6] Kyriakou, M., Eliades, D. G. “ImportEpanetInpFiles” QGIS plugin. KIOS, Research and Innovation Center of
Excellence, 2016, Available: https://github.com/KIOS-Research/ImportEpanetInpFiles date accessed Apr 2019
[7] Almeiro, J.. “QWater” QGIS plugin, based on GHydraulis of Steffen Macke, 2014. Available:
https://github.com/jorgealmerio/QWater, date accessed Apr 2019
[8] Righetti, M. De Luca, A, Menapace, A, Pistauro, G, Gerola, D. “QEPANET plugin for QGIS”, Univ. Trento
and Bolzano, 2016 Available: https://github.com/albertodeluca/qepanet, date accessed Apr 2019
[9] Alvarruiz, F., Martínez Alzamora, F. “Loopnet. A new and more efficient EPANET-based Toolkit based on the
loop equations” 17th Int. Conf. CCWI 2019, Exeter, UK