UrbanWater: Integrating EPANET 2 in a PostgreSQL/PostGIS-Based Geospatial Database Management System

Abstract
Incorporating data stored in a geographical information system (GIS) within the development of hydraulic simulation models is crucial for operating, updating, and hence redesigning water supply systems (WSS). Building and updating hydraulic models can be both time and resource consuming; moreover, the need to update infrastructure cadastral information makes the model itself outdated. In addition, typical dispersion of data across several databases requires extra effort to maintain the whole system and ensure it is properly assembled. Albeit there are some GIS-based hydraulic modelling solutions available, they typically use external connections to assemble all components resulting in additional costs and less flexibility. In order to be able to establish a single fully integrated data model towards global characterization of a WSS and associate hydraulic simulation, this paper proposes the specific implementation of an EPANET 2 model in PostgreSQL along with PostGIS extension. The system developed enables the construction of the model, hydraulic simulation, and storage of results within a single database. Required procedures and functions were coded either in pgSQL or Python and their execution were carried out using SQL statements. Finally, a case study was selected in order to test the system proposed. Results show that an integrated approach indeed allows the expedited creation of more realistic hydraulic models based on the stored cadastral information.