You are on page 1of 2

3.

2 Database data storage

http://www.giswater.org/book/export/html/31

3.2 Database data storage


This provides a tutorial on how to use Giswater with EPANET with Database data storage. In order to
activate this data storage mode go to: Giswater Project preferences Data storage: Database

3.2.1 Quick start tutorial


A simple case can be performed following the steps below:
1) Start the project by creating the new project preferences file: File New project preferences
2) Select the Water software: EPANET
3) Select the Data storage: Database
4) Configurate the connection parameters
5) Create a new project data scheme: Fill the project name,the project title and select the SRID.
6) Create the GIS project: Fill in the information for project folder and project name.Also choose the water
software and the data storage (in this case EPANET and data storage), and finally select the scheme name
necessary.
7) Click on Accept on the Project Preferences menu
8) Select US or metric units: Options flow units. Choosing US flow unit; this means that all other
quantities of the project will be expressed in US units, while choosing a metric flow unit will force all
quantities to be expressed in metric units.
8) Complete the material catalogue at least with one record: Material catalog. The default formula used for
computing head loss for flow through a pipe is Hazen-Williams (H-W). It can be seen that in the
EPANET's user manual,it explains how to determine the roughness value. In addition, this can be changed
to the Head loss formula from: Options Head loss.
9) Open GIS project and build the network which should contain the next layers:
GIS PROJECT Sector. You must create at least one sector.
EPANET DATA Hydraulics - Node - Reservoirs. You must create and edit at least one reservoir. See
APPENDIX C EPANET users manual (JUNCTIONS and RESERVOIRS target) for more information.
EPANET DATA Hydraulics Node - Junctions. You must create and edit the junction records of your
network. See APPENDIX C EPANET users manual (JUNCTIONS target) for more information.
EPANET DATA Hydraulics - Arc - Pipes. You must create and edit the pipe records of your network
(joining the different nodes). See APPENDIX C EPANET users manual (PIPES target) for more
information.
10) Configure INP file additional parameters. You can define how many sectors will be simulated: Sector
selection, and configure the simulation options, times and report data: Options / Times / Report.

1 of 2

2015-08-07 09:18

3.2 Database data storage

2 of 2

http://www.giswater.org/book/export/html/31

11a) Generate INP file: export INP checkbox. In this way, Giswater driver will create a text file (inp
extension) stored on the selected folder.
11b) Execute the command line EPANET: Execute EPA software checkbox. Giswater will execute the
command line EPANET file with the inp file, and EPANET will generate two result files (*.rpt file and
*.out file.) stored on the selected folder.
11c) Import Results (optional): Import results check box. Giswater will read the result data stored on rpt
file and will write the values on the schema result tables with the project name selected.
12) Returns to the GIS project and enjoy the simulation's results on the different shapes and tables of
SIMULATION ANALYSIS.

3.2.2 Database key relations


Key relations between features and tables should be mentioned at this point.
First of all, the key relations from ARC and NODE to other tables are defined as 'on delete cascade on
update cascade.' This means that if you delete one feature from these tables, all related features from other
tables will be deleted. On the other hand if you update values from these tables, values in all related
features will be updated in cascade too.
Further, key relations from SECTOR and MATERIAL are defined 'on delete restrict on update cascade'.
This is quite different from the previous one, because it means that you can not delete used features from
these tables. On the other hand, if you update values from these tables, values in all related features will be
updated in cascade too.
The rest of features do not have relations. Elements as EMITTERS, ENERGY, STATUS, CONTROLS,
RULES, DEMANDS, CURVES, PATTERNS, QUALITY, REACTIONS, SOURCES, MIXING do not
have key relations from theirs to other tables. In this way you must know that If you update features, the
values will not be updated on related tables (if they exist) and if you delete features, mentioned on related
tables will not be deleted (if they exist too).

3.2.3 Database sequences


Sequences are an interesting option of databases as PostreSQL. They are autonumeric and they can be used
in order to facilitate the work on several tables. Enjoy it!!

3.2.4 Additional information


For more information about the GIS Table Of Contents (TOC) of EPANET project, please visit the
EPANET section of APPENDIX A - DATABASE GIS PROJECTS

2015-08-07 09:18

You might also like