Abstract
This article focuses on creating a model for the automatic generation of the EPANET input file from the layout of the arrangement of the streets designed in a CAD environment. From this layout a binary image is built, in which each pixel will be black if is inside the street and, otherwise, white. In order to determine the location of the pipes and nodes that are in the middle of the streets, the Zhang and Suen method of thinning binary images was used. After the image was thinned, the main challenge was to identify the pixels that will be considered as nodes of the network due to the irregular geometry of the streets. To solve this problem, a set of algorithms was developed on the theme of binary image processing. Two street layouts were used, one hypothetical and the other real. For both layouts, the model proved to be efficient, automatically generating the EPANET input format file with the pipes located within the streets.




















Similar content being viewed by others
Data Availability
Not applicable.
Code Availability
The code is available in the following link: www.aquacad.net/automaticgeneration.
References
Autodesk Autocad (2020) About the DXF Format (DXF). Autodesk Inc. https://help.autodesk.com/view/OARX/2019/ENU/?guid=GUID-235B22E0-A567-4CF6-92D3-38A2306D73F3. Accessed 30 May 2020
Barabási AL, Albert R. (1999) Network basics 1. System Sciences at Sis. http://systems-sciences.uni-graz.at/etextbook/networks/networks.html. Accessed 22 Apr 2020
Chen YS, Hsu WH (1990) A comparison of some one-pass parallel thinnings. Pattern Recogn Lett. https://doi.org/10.1016/0167-8655(90)90053-5
De Corte A, Sörensen K (2014) HydroGen: an artificial water distribution network generator. Water Resour Manag 28:333–350
Dill AR, Levine MD, Noble PB (1987) Multiple resolution skeletons. IEEE Trans Pattern Recognit Mach Intell 9:485–504
Emmanouil S, Langousis A (2017) UPStream: automated hydraulic design of pressurized water distribution networks. SoftwareX. https://doi.org/10.1016/j.softx.2017.09.001
Gonzalez RC, Woods RE (2018) Digital image processing, 3rd edn. Pearson, London
Guo Z, Hall RW (1992) Fast fully parallel thinning algorithms. CVGIP: Image Understanding.https://doi.org/10.1016/1049-9660(92)90029-3
Hall RW (1989) Fast parallel thinning algorithms: parallel speed and connectivity preservation.https://doi.org/10.1145/63238.63248
Hallmann C, Kuhlemann S (2018) Model generator for water distribution systems. operations research proceedings. https://doi.org/10.1007/978-3-319-89920-6_34
Holt CM, Stewart A, Clint M, Perrott RH (1987) An improved parallel thinning algorithm. Commun ACM . https://doi.org/10.1145/12527.12531
ITA. EPACAD. Universitat Politécnica de Valência (2020) https://www.epacad.com/. Accessed 24 June 2020
Kaur K, Sharma M (2013) A method for binary image thinning using gradient and watershed algorithm. Int J Adv Res ComputSciSoftwEng 3:287–290
Lakshmi JK, Punithavalli M (2009) A survey on skeletons in digital image processing. In: International Conference on Digital Image Processing. https://doi.org/10.1109/ICDIP.2009.21
Lam L, Lee SW, Suen CY (1992) Thinning methodologies - a comprehensive survey. IEEE Trans Pattern Anal Mach Intell 14(9):869–885
Lü HE, Wang PSP (1986) A comment on a fast parallel algorithm for thinning digital patterns. Commun ACM 29(3):239–242
Maragos PA, Schafer RW (1986) Morphological skeleton representation and coding of binary images. IEEE Trans Acoust Speech Signal Process 34(5):1228–1244
Mathworks (2020) Structuring Elements. The Mathworks, Inc. https://www.mathworks.com/help/images/structuring-elements.html. Accessed 17 Apr 2020
Möderl M, Fetz T, Rauch W (2007) Stochastic approach for performance evaluation regarding water distribution systems. Water Sci Technol 56(9):29–36
Möderl M, Butler D, Rauch W (2009) A stochastic approach for automatic generation of urban drainage systems. Water Sci Technol 59(6):1137–1143
Muranho J, Ferreira A, Sousa J, Gomes A, Marques AS (2012) WaterNetGen: an EPANET extension for automatic water distribution network models generation and pipe sizing. Water Supply. https://doi.org/10.2166/ws.2011.121
Press WH, Teukolsky SA, Vetterling WT, Flannery BT (2007) Numerical recipes: the art of scientific computing, 3rd edn. Cambridge University Press, New York
Rodrigues GPW, Costa LHM, Farias GM, Castro MAH (2019) A depth-first search algorithm for optimizing the gravity pipe networks layout. Water ResourManag 33(13):4583–4598
Rossman LA (2000) EPANET 2 Users Manual. U. S. Enviromental Protection Agency, Cincinnati
Sarkar M, Chatterjee S (2016) A survey of thinning techniques on two dimensional binary images. Int J Sci Res. https://doi.org/10.21275/v5i7.ART2016439
Senthilnayaki M, Veni S, Kutty K (2006) Hexagonal pixel grid modeling for edge detection and design of cellular architecture for binary image skeletonization. In: Annual IEEE India Conference. https://doi.org/10.1109/INDCON.2006.302802
Sitzenfrei R, Möderl M, Rauch W (2013) Automatic generation of water distribution systems based on GIS data. Environ Model Softw. https://doi.org/10.1016/j.envsoft.2013.05.006
Trifunović N, Maharjan B, Vairavamoorthy K (2013) Spatial network generation tool for water distribution network design and performance analysis. Water Supply 13(1):1–19
Xiao N (2015) GIS algorithms. SAGE Publications Ltd, Thousand Oaks
Yang L, Oyen D, Wohlberg B (2019a) A novel algorithm for skeleton extraction from images using topological graph analysis. In: Conference on Computer Vision and Pattern Recognition Workshops Recognition. https://doi.org/10.1109/CVPRW.2019.00152
Yang L, Oyen D, Wohlberg B (2019b) Image classification using topological features automatically extracted from graph representation of images. In: Proceedings of the 15th International Workshop on Mining and Learning with Graphs. ACM, New York
Zhang TY, Suen CY (1984) A fast parallel algorithm for thinning digital patterns. Commun ACM 27(3):236–239
Author information
Authors and Affiliations
Contributions
Luis Henrique Magalhães Costa: Interpretation of data, drafting the article, revising the article critically for important intellectual content, final approval of the version to be published, and agree to be accountable for all aspects of the work.
Gustavo Paiva Weyne Rodrigues: Interpretation of data, drafting the article, revising the article critically for important intellectual content, final approval of the version to be published, and agree to be accountable for all aspects of the work.
Corresponding author
Ethics declarations
Ethics Approval
Not applicable.
Consent to Participate
Not applicable.
Consent for Publication
Authors consent to the manuscript for publication.
Conflict of Interest
None.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Costa, L.H.M., Rodrigues, G.P.W. Automatic Generation of Water Distribution Networks from Streets Layout. Water Resour Manage 35, 1299–1319 (2021). https://doi.org/10.1007/s11269-021-02785-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11269-021-02785-8

