Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this second section of the user’s guide, you will find all the necessary steps that must be done before starting working in the Giswater environment, from the pre-installation requirements of the software’s configuration, through the creation of new projects real or example), to test the functionalities of Giswater.
To start working with Giswater you must have at least 2 programs:
PostgreSQL: The installation process must include the selection pgAdmin component (Data Base Manager) and Postgis application (Spatial Extension)
QGIS: Geoprocessing Software
PostgreSQL can be on our machine or on any server where we have access. QGIS, on the other hand, must always be installed in our machine.
To download all the necessary software is recommended that you visit the Giswater webpage, where you can find the download links for the softwares and the compatible versions with the ultimate release of the Giswater plugin.
PostgreSQL is an open-source database with enormous potential, which will be used to store all the data with which Giswater works. Thanks to its geospatial extension PostGIS allows an extremely comfortable relation with GIS, especially QGIS. This extension contains over 1000 geospatial functions, which makes it one of the most powerful GIS software available, although PostgreSQL is not a specific GIS program.
We have at your disposal a collection of tutorial videos to help you get started:
There are different available versions to download. To work with Giswater a version within 10 and 16 is needed.
In Github you can check the compatibility between PostgreSQL and Giswater versions.
Step 1) Considering you already have QGIS installed, you must download PostgreSQL
On the installation process make sure to install all its components. PgAdmin will be the user interface for the Data Base (DB) management. It will be used to manage the database and visualize it. PgAdmin also allows the user to modify the tables, views and rules of the database, as well as consult all the information and manage it.
Further, you must create a password for the superuser, which will be necessary to access your pgAdmin for creating and managing a database and also to do a connection to the database from QGIS.
In the installation process, habilitate the PostGis Extension
Once both programs are installed, after opening pgAdmin the first thing that needs to be done is add a new connection
Step 2) Create a Database for your projects on PostgreSQL using pgAdmin interface
The DB name must not contain special characters or uppercase letters.
Once the new connection is created, the first ‘public’ scheme is automatically created in a database. Next, the PostGIS extension must be added, to have all the GIS functionalities available, as well as the pgRouting extension, which adds routing and network analysis functionalities to the database. pgRouting will be essential for some of the Giswater tools such as the cutting polygon and the longitudinal profiles.
As of PostGIS version 3, it will also be necessary to add the specific extension to manage raster layers.
After those steps, its time to go back to QGIS and make a DB connection from QGIS to the just created DB using pgAdmin
When opening QGIS for the first time, a series of parameters must be configured. They are necessary to work with Giswater:
Create a PostGIS connection to the database where the data schema is located
To work comfortably and quickly with raster data, it is recommended to expand the cache memory of QGIS to 1GB and 1 year, through the menu 'Settings/Options/Network'.
Choose open form if a single entity is selected
1 - Click on the icon Add Postgis Layer
2 - Click over New and in the form introduce the connection parameters.
3 - Once the parameters are filled in click on Test Connection. If everything is correct the message will appear:
4 - Click OK. At this time, the connection information will be saved with the name on the connection list.
If we want to create new schemas with this connection, the user must be SUPERUSER on PostgreSQL.
To use the Giswater plugin it is necessary to have created a connection to the database that we will use to work. It needs to be created once for each installed QGIS.
Multiple connections to different databases are possible, although in this case it is recommended to work with caution to avoid mixing data between databases.
Once connected we can visualize the tables (with and without geometry) that contain the corresponding database and, if necessary, add them to the project.
In previous versions, Giswater was composed of an application, which acted as a driver for the configuration, creation, and management of the different projects on the database, and a plugin based on QGIS for the exploitation of network elements. Starting from version 3.2, it will only be necessary to install the plugin in QGIS to develop all the before mentioned functions.
In order to download the plugin, the URL of the repository is needed:
The latest realease and repository’s URL can be found on the Giswater website, where is also possible to access the older versions of the plugin.
From the downloads tab it’s also possible to access the information about the product, the benefits of using open-source software, the expert’s community who develop Giswater and get the materials and tutorials to learn how to use it.
To install and connect the Giswater plugin with QGIS, it’s necessary to configure a new repository, which will allow viewing the Giswater plugin in the plugin list. For this we must follow the following steps:
1 - Open QGIS and access plugin repository (Plugins).
2 - Access the tab of Settings and add a new repository.
3 - Introduce the name and identify the repository and URL.
4 - Find and install Giswater plugin from the tab ‘All’.
Warning: If we want to update the plugin to the most recent version, it can be done, but this may have implications that we will see later.
The Giswater plugin tool should appear on the Plugins toolbar. If we do not have it activated, we will have to do it through View> Toolbars> Plugins.
If, when installing the plugin for the first time with satisfactory results, the Giswater button in the Plugin toolbar does not automatically appear, we must close QGIS and open it again.
In case of having more than one QGIS project open, the behavior of the plugin may present instabilities, so it is recommended not to use the plugin with more than one QGIS project opened.
This is the tool that a Giswater user should know while starting to work with it. Unlike the other buttons that the plugin incorporates, it is in the general toolbar next to the other buttons of different plugins installed or specific to QGIS.
Most of the functionalities of this tool will only be executed if we open QGIS without any Giswater project (we understand by Giswater project a project that has at least the representation layers of nodes, arcs, connecs of a database schema).
In case of initialization and the first steps with the plugin, we must know how to use this tool to perform all its functionalities:
Generate new working schemas (directly in the database)
Show the existing schemas
Update and edit existing schemas
Provide information about the selected schema
Only when the connection is using a SUPERUSER of PostgreSQL will be possible to create new schemas or update it.
Using the general tool of project management, that was just presented in section 2.4.2, we are going to create a basic template of the working scheme in the database, which can later be opened and edited as a QGIS project. By referring to an empty schema, it does not mean that there is no full data in the tables, but that the data of a specific network are not, however, we will find common and system values that any Giswater work schema must necessarily incorporate.
The first thing we must keep in mind is that this tool, in its first drop-down list called Connection name will show all the PostGIS connections that are created in our QGIS. In section 2.3 of this manual, a connection with the name Giswater was created, so this connection appears as available in the tool (Image below). We will then have to consider the connection parameters that we have given in order to know which database the tool will attack and therefore where we are going to generate the new template.
Knowing which database calls the connection, click Create to open the configuration form for the new work scheme.
After clicking Accept, the schema will be created, and the program will let us know about its status:
We can also see in the database, through pgAdmin, that the manual_ws schema has appeared with the functions, sequences, tables, triggers, and views that contains a Giswater template for supply networks.
There are many types of tables within all those created in the previous section. There are some that are already filled by default, others that will be filled in as elements of the network are created and there are tables that can be customized by the users, depending on their needs and those of their network.
The basic tables that match the main generic elements of any Giswater project are of great importance and must be considered in order to explain this section. They are the following:
Arc
Node
Connec
Gully (only for UD)
These four tables are empty and will only be filled when our project has geospatial elements of the corresponding type, but they have certain restrictions when filling them and relationships with other tables that must be met.
For any user who wants to customize the types of elements, a consult to a pretended table should be done and modify according to their liking.
cat_feature
This table serves as a catalog for all items of the various types. In any created scheme we will already find values, but we can easily change names, add or delete rows.
Each element that exists in cat_feature must be part of an element type (feature_type), which can be NODE, ARC, CONNEC or GULLY, and in addition to another type within each of the previous ones, specified in the sys_feature_type table (not modifiable by users).
Each user can customize the cat_feature table with specific elements that are necessary for their network, as long as these are related to one of the fields of sys_feature_type (for example, TANK or FOUNTAIN) and with one of the existing feature_type.
In a lower order of hierarchy of tables that determine the existing elements, we find the catalog tables (see section 4.2.1.1), which must be filled in by relating each new element, with a name to suit the user, with any of the existing ones in cat_feature.
cat_node
cat_arc
cat_connec
cat_grate (UD)
If in these last catalogs you want to add values for the material columns, it will also be necessary to previously fill in material catalogs:
cat_mat_arc
cat_mat_node
Then there are other interesting tables for adding custom value domains:
man_type_category
man_type_fluid
man_type_function
man_type_location
In these tables we can add specific information about the type of category, fluid, function or location related to the different types of basic elements (arc, node, connec, gully). Each of the tables has the following fields:
id
serial
Numeric auto identification (primary key)
*_type
varchar (50)
Field to put our information that will be used in the arc / node / connec / gully tables
feature_type
varchar (30)
Type of element to which the value is assigned
featurecat_id
varchar (30)
It allows us to detail more in each of the large categories
observ
varchar (150)
To add additional information
*category/fluid/function/location
To give an example of the use of these tables, we could define a domain catalog of custom values for a tank (deposit) in addition to the one that would correspond to it for node.
For information purposes, but it is important to know, these fields are managed by the database using foreign keys to guarantee the consistency and uniqueness of the information. As you can already guess, the foreign key has special characteristics to govern this system of different values depending on the source table. One of the most important characteristics is the duplication of the foreign key.
This means that, to give an example for the node table, and regarding the type of fluid, the double key is managed in such a way that only those values of fluid_type in the man_fluid_type table that meet the condition will be available in the node.fluid_type field. that have the field feature_type = 'NODE'. This double foreign key guarantees that the information is consistent at all times, avoiding insertions that do not meet this criteria and propagating changes in the event of renewing or deleting value domains.
To facilitate the first steps with Giswater and have a complete data model that serves as a reference source, Giswater has incorporated two example schemes, for both urban drainage and water supply networks.
Having a first complete data model, apart from serving as a query source to see how the data is structured within each of the tables, will allow to start with a test environment and practice all the features that the Giswater plugin contains.
In order to create the sample, repeat the previous steps of creating an empty schema, explained in the section 2.5.1., but when the time comes to create the schema, you will have to select Example data instead of Empty data.
We will automatically have a Giswater sample project created with all kinds of information and sample data to see its functionality at maximum performance. With the giswater 3.2 plugin, the example schema can be given whatever name the user wants, unlike previous versions where the name was necessarily ws_sample and ud_sample.
Another possibility is, if you already have a ".inp" EPA file, you can also create a schema using your previous model data. This functionality is still in Beta mode, which means it is still being developed, so may occur some troubleshooting when trying to do so. In this case, we will be happy to help you!
With the general project management tool, apart from creating the schemas within the database, we also can automatically generate projects for QGIS, specifically designed to work with database tables, as well as designed with symbology that allows the project data to be viewed in the most comfortable way possible.
To create these Giswater project templates, we must click on the Create GIS project button in the initial form of the tool.
In the small form that will be opened next, we must choose the type of project that we are going to create based on a role. Later in this manual (section 3.5) it will be explained which are the roles that Giswater manages, as well as their characteristics and properties, but for now all we need to know is that the number of layers loaded in the project will be different depending on the role that we choose and, in the same way, the number of functionalities that we can carry out with the plugin will also be modified.
We recommend that, for users who do not use Giswater in a corporate environment, they always choose the admin role to enjoy all the plugin's features.
During the creation of the GIS project, we must also choose a name for the qgs file and a folder where to save it.
Finally, if we want this project to be opened without having to enter the access credentials to the database, we have the possibility to mark Export user password, so that the created file will directly store these credentials and we can open it without having to enter user and password.
By clicking Accept, the file will be created, and we will be ready to open it.
We must bear in mind that, when creating a GIS project:
• For an empty schema we will not see anything inside the QGIS map, and we will have to manually add the data. If what we want is to start drawing our network and enter data from scratch, we will have to follow some specific steps, as there are certain mandatory work rules that will be discussed throughout this manual. In section 6 we will find a brief practical guide on how to digitize a network starting from scratch.
• For an example scheme we will directly have a network with all the data filled in to be able to test the functionalities of the plugin.
• You can also try to import a .inp file from an existing EPA hydraulic model , to see how it looks in GISWATER, for this we advice you to take a look on Import inp file debug mode on GitWiki for more info.
By clicking the SQL command button, we can write our first query
How to configure a new connection between QGIS and PostGIS?
Giswater is prepared to simulate flow data in water projects (WS) taking data from the commercial management system. It is not an easy task. You will need specific tables similars to the ones on the following list (mandatory on bold):
hydrometer hydrometer_x_data hydro_cat_catalog hydro_cat_category hydro_val_state hydro_cat_period hydro_cat_priority
By using a script to connect to the CRM, these tables can be filled, either with real-time data, or with data obtained through a nightly data loading and updating process.
Usually these tables are stored in an specific schema named crm.
Once the tables are filled in, its information must be connected to Giswater data model with their corresponding correlation tables:
ext_rtc_hydrometer ext_rtc_hydrometer_x_data ext_cat_period rtc_hydrometer rtc_hydrometer_x_connec
WORKFLOW OF TABLES AND DATA
For each hydrometer, table ext_rtc_hydrometer need to be filled using some nightly process. After first load it only updates changes.
For hydrometer consumptions, the table ext_rtc_hydrometer_x_data need to be filled using some nightly process each time you have new data from billing period (in combination with ext_cat_period).
For each hydrometer, the relation with the Giswater hydrometer is: rtc_hydrometer.hydrometer_id::text = ext_rtc_hydrometer.id::text
For each hydrometer, the relation with the Giswater connec is: ext_rtc_hydrometer.connec_id::text = connec.customer_code::text
Finally it is mandatory to keep the table ext_cat_period updated and be sure that you fill two tables more with giswater ids (hydrometer_id & connec_id)
rtc_hydrometer with hydrometer_id
rtc_hydrometer_x_connec with hydrometer_id and connec_id
Welcome to Giswater, the first open-source software for water cycle management (water supply and urban drainage).
The software has been licensed under the GNU-GLP 3 License.
The following document is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
This user’s guide aims to help you start working with Giswater.
Giswater is an open-source application for management and exploitation of hydraulic infrastructure elements in both water supply and urbain drainage. It is accessible using database and graphic representation using any kind of geographic information system (GIS).
At the same time, Giswater can act as a driver connecting spatial database with tools used for hydraulic analysis.
Currently Giswater is on the third version of the software, which represents notable improvements comparing with previous versions, not only graphically but also in usability and capabilities.
As presented on this image , Giswater is located between the applications, which used all together allow a solid and global management in relation to water supply and urban drainage models.
The central element of the set is the database, where all the information and most of the functionalities of each Giswater project is located. Giswater uses PostgreSQL database, which together with its PostGIS extension allows to conveniently link it with the next application of the set: QGIS.
This geographic information system software has been based the development of the Giswater project, in its visual branch and with greater operability by the user. QGIS is related through PostGIS to the database, showing organized spatial data and always considering all the rules, relationships and processes established in the database.
The central point of the project (Database - GIS) also allows to connect with SCADA, to update in real time, the information that comes directly from the physical elements of the network. In this way, Giswater is also a global management system that allows its users to always work with data that is updated automatically.
Apart from the data management through GIS software there is also the possibility of working with Giswater data in web and mobile environment. This functionality is separate from the usual desktop use, since it is only for customers that require it.
The most important goal of this guide is to provide the user a document which will help to carry out any task with Giswater, from the initial installation process of the necessary programs to the most complex management operations.
The improvements made in the version 3 will be reflected throughout the manual and the purpose of those improvements, together with the instructions of how to make use of them, will be explained in the best possible way.
Furthermore, on the Github Wiki page there are more specific information about the plugin, with a greater technical focus:
Once all the tools of the Giswater plugin are known, it is time to use the full potential of the program and start working with the water network. It is considered appropriate and interesting to dedicate a section to know the necessary steps to digitize parts of the network, because it is one of the most common processes for those in charge of managing it.
Here below you can find those steps, and some data and hierarchy relations when filling the layers with your project. Furthermore, additional technical information is compiled at the GitWiki:
If we are faced with an empty project, before inserting any element, we must consider some initial steps. Next, we will see in a practical way what it is necessary to do:
1 - Fill in the catalogs
It is necessary to fill in the catalogs of elements that will be introduced. Initially the data must be entered in the cat_feature, cat_feature_node, cat_feature_arc, cat_feature_connec, cat_feature_gully(ud) tables. We remind that the catalogs are explained in section 4.2.1.1 of this manual.
Before the element catalogs, it will be necessary to have some record in the material catalog, both for arcs and for nodes.
2 - Map zones
As it was presented in the section 3.4 the map zones are are essential for the use of Giswater, so that, before introducing elements, a series of zones of the map must be defined.
It can be done directly with the QGIS project, looking for the corresponding layer and adding a geometric element (polygonal). The relation of creation of zones of the map, in order, should be this:
Macroexploitation (without geometry)
Exploitation
Dma
Sector
Municipality
Part of the plugin tools are used to digitize, especially those associated with role_edit, but other parameters must be considered so that the insertion of new elements is correct and precise. Next, it will be explained in detail which are the steps to follow, in chronological order, to digitize new elements, both linear and specific:
Example of digitalization of a new section of the network
Through a practical example, carried out in one of the sample projects of Giswater, it will be explained how a new section of the network can be generated, which will consist of the insertion of 5 new nodes and 4 arcs. All these new elements must be placed in a specific position, as represented in the image below, simulating a real work.
The elements represented in the image refer to the nodes, which will consist of 3 junctions (Junction), located at the intersections of the arcs, a valve, and a hydrant. The arcs will be all pipes (Pipe), which will be drawn in a straight line connecting the nodes.
Process
1 - Before creating any element, it is especially important to know which are the mandatory fields for each type of element are, so that, if they are not filled in during the insertion, it will not be completed. The following table specifies these fields and how they can be filled in, since Giswater offers different methods to facilitate the insertion of data. In the form itself the mandatory fields are marked with a *.
Field
In case leaving it NULL, how is it filled in?
Node/Arc catalog
Default value (one for each element)
Municipality
Default value, if not the value is captured from geometry
Exploitation
Default value, if not the value is captured from geometry
Dma
Value is captured from geometry, if not it uses default value
Sector
Value is captured from geometry, if not it uses default value
State
Default value, if not the first value from value_state table
2 - As we see, it is important to configure default values, since many times the insertions of new elements will be made in the same municipality, exploitation, dma and sector. The default values will allow to work faster. For this example, using the configuration tool, we set the default values for Hydrant catalog, Junction catalog, Valve catalog, Verified (field not mandatory but recommended), Exploitation, Municipality, Sector and Dma. The state will be entered manually each time.
3 - If we want to digitize with an extremely high degree of precision in the placement of elements, as is the case in this example, before entering any element we must draw support points to then place the nodes in the specific place. To draw these support points there are different options: the CAD tools of the Giswater plugin or other tools incorporated into QGIS, such as the ‘advanced digitization tools’.
4 - To draw the first support point, which must be 2 meters from the intersection between the street 9110C and arc PVC110-PN16, we will use the 'Create Circle' plugin tool. With the snapping activated, place the cursor over the intersection and click. The radius of the circle must be 2 meters.
5 - At the intersection of the circle line with the Pipe layer is where we must place the first Junction element. Using the keyboard shortcut (J) we place the new element just above the intersection. To know that we have done it well, the program must show a window that indicates that we are going to break an arc. As we have many values established by default, in the element form we only must indicate the status, in this case, ON SERVICE. We will also mark the type of status as ON SERVICE.
6 - With the first element already introduced, now we need to place the second support point, which will serve to mark the location of where we want to insert the valve. This should be 12 meters from the beginning of the street 9110C and 2 meters to the left.
7 - With the tool 'Add relative point', we mark the first point at the beginning of 9110C street of the Streetaxis layer and another at a certain distance on the same line. This way we can draw a point 12 meters from the beginning (x) and 2 meters towards the outside (y).
8 - Just above this support point is where we place the new valve. As before, the only values we fill in manually are the state and the state type. The rest are configured by default.
9 - To draw the next support point (in this case it will be a line), we will use the QGIS tools. With the advanced digitizing panel, it is possible to draw a line perpendicular to node 1072 and which, at the same time, is 2 meters from the street 9110C.
10 - The first step is to generate a new temporary draft layer (Image below). It must be a linear layer, with the same EPSG as our project has. Once created, we put the layer in edition and click on 'Add spatial object'.
11 - With the advanced digitizing panel active, we first select the node from which we want the new line to start. Then we click on the 'Perpendicular' button and select the arc that will serve as a reference to draw the perpendicular line, in this case the Pipe showed in the next image. We should note that a fine auxiliary line is drawn perpendicular to the desired node. Now, we can click on the street axis, thus establishing the first part of the line. Without stopping the edition, we establish a radius of 2 meters in the field where it says 'd', considering that we must be located above the axis of the street. We click again on the auxiliary line, now just above the intersection with the generated 2-meter circle. Once we see that the red line reaches where we want, we click the button to the right of the mouse to end the support line.
12 - Using this line, we can place the third node of the example, in this case a union of type 'T'. In the same way as in previous cases, we insert the new element right at the limit of the support line, knowing that it is exactly where it should be: two meters from the street axis, perpendicular to the other pipeline and at the same height as the union that ends this pipe.
13 - At this moment we want to place the hydrant, which must be 4 meters from the junction that we have just generated and at the same height. As we have the support line still visible on the map, we will use it again to locate the new support point. Knowing that it must be at the same height as the line, with the 'Add relative point' tool, we will introduce a support point.
14 - With this tool we mark a point on the node 114470 and another one on the support line of the temporal layer. The 'x' must be -4 and 'y' must be 0. As we have clicked on the node first, we select the Init point as the exit point of the relative element.
15 - Next, we place the hydrant element just above the support point that we just added. As always, with the default values configured, we just manually add the node state.
16 - Now we have added four out of five nodes that were planned at the beginning of the example. To insert the last union, which will break the arc FC110-PN10, we will use the same method as in the first union of the example: draw a circle with a radius of 2 meters at the intersection of the arc and the street axis.
17 - We insert a union element, checking that the arc was divided into two.
18 - We have finished inserting nodes. Currently, we only have to connect the different nodes with arcs. The insertion process is quite simple.
19 - At the beginning of the example, we only established the default values for node-type elements. Now we must add the default value for the arc catalog, in this case FC110-PN10, so the insertion will be faster.
20 - To add the first pipe, using the keyboard shortcut 'P', we choose the start node and the final node, and clicking with the left mouse button to set it and with the right button to finish the line.
21 - We repeat the process of inserting pipeline elements to join all the nodes created during this example, so that the network connects from one side to the other. The final result can be seen in image below.
Apart from Giswater plugin's functions, another great tool to accurately digitize the network is the Advanced Digitizing Panel, a group of tools ready to use by default in QGIS.
This panel allow users to draw support points or lines to later insert the network using these supports. It's especially useful when some parallel or perpendicular lines are needed.
In the next image there's a complete schema of the functionality of the panel, since it's not easy to use at the beginning.
Once the software installation, the necessary configuration and the creation of data schemas and projects have been completed, the user must become familiar with the basic rules of working with Giswater. Apart from those already mentioned in the previous sections, which were indispensables for preparation process now it is time to make an approximation of the tool operation, its characteristics, and capabilities, with special emphasis on the rules of how to work with the data in a safe way.
One of the main advantages of working combining a database with GIS is the great capacity that can be acquired in terms of robustness of the data thanks to the existence of primary and foreign keys, topological rules, or the possibility of managing the data edition.
In this section the main rules and knowledge, which need to be considered while working with Giswater, will be presented.
There are two vastly different types of projects in the world of Giswater, which have great similarities in terms of the structuring and categorization of data, but which at the same time should not be confused by the user. It’s always important to know if you are working on:
Water Supply (WS)
Project related to the drinking water supply network of a territory. The data represents all the elements that are necessary for this type of network, starting with the pipes (arc elements) and following with the valves (node elements), that are found along the network among many other elements. Giswater aims to represent as accurately as possible the reality of a water supply system, so it covers all possibilities that may occur in the system.
Specifically, for WS, the main tools are used to regulate and manage water flows, pressures or planning of supply to customers based on the moment. In relation to this, there are sets of tables that allow the monitoring of the flows thanks to SCADA systems or the management of real visits to the elements of the network.
Urban Drainage (UD)
Project related to the sanitation and drainage network of urban waters in a territory. As in WS projects, the aim is to represent the network in the most realistic way possible. Here the main elements are the conduits in which the wastewater circulates. There are elements that coincide with the water supply projects, but most of them are characteristic only for drainage networks, such as the gullies or the sewage treatment plants.
Some of the most prominent tools of this type of project are related to the direction of wastewater circulation, either upstream or downstream. In this sense, Giswater allows to represent a profile of the conduits with relevant information about them.
This guide is unique for both types of project, although individualized manuals for each of them could perfectly exist. It has been worked to unify it to have all the information of Giswater in a single document, but the intention is that within this manual the user can quickly differentiate if the content of a section is specific to a WS project, a UD project or a common section.
To accomplish this goal, all sections of the document that are specific to a project type will be marked with a color: blue for WS and yellow for UD. All the sections presented so far have been common, but from now on the big differences between projects will be shown.
The following table compares some of the highlights of both types of projects:
One of the most attractive and representative characteristics of Giswater is the large number of elements that can be represented in the work environment, a fact that allows a very adjusted representation of reality and that the user can satisfy all its needs in respect of the conditions of the network it manages.
In this section, the functionality of the main existing elements, which are visually represented in the following image, will be developed. Most of the elements are represented here, although later we will see that there are more.
Node
One of the main element types of the network. It is always governed by topological rules. The node-type elements have been divided into a multitude of categories, differentiated for WS and UD projects. They are always represented as points, although some may have associated polygons that represent their real perimeter when needed.
Nodes are always placed between two arcs; therefore, they break these arcs in different entities. Most of the elements perform specific functions to break (such as flow reductions or check valves), although there are nodes that would not normally break arcs, in some special cases they must perform this function. They are the ones represented in image from above:
Netwjoin: is a water connection (connec) that by its dimensions or other characteristics is a part of the network and is located on top of an arc.
Netgully: is a gully that by its dimensions or other characteristics is a part of the network and is located on top of an arc.
Netelement: is any element that does not usually connect to the network but due to its characteristics must be placed on top of an arc and cut it.
Arc
Arcs, together with nodes, are the main elements of the network. They are located between two nodes and represent the conduits and pipes of the network. There are not as many types of arcs as there are of nodes, although they are also categorized and all their characteristics (such as diameter, material, roughness...) can be added in their attribute table to differentiate them better.
In the image from above, the functioning of a Varc (virtual arcs) is presented. They connect the network topologically between arcs and nodes when in reality an arc reaches a polygon and therefore does not really exist inside it as an arc. This is necessary for the topology rules to work correctly in the Giswater network. They are usually short stretches.
Connec
Connections, the elements that connect the network with buildings or other elements such as fountains. They are point elements, although to link the connections with the rest of the network, links and virtual nodes are used.
Gully
Gullies that are not placed on top of the arcs but are located at a certain distance from the network. Most are of this type; the rest are the netgully and are represented as nodes. They are also specific elements and, like connections, can be related to the network through links and virtual nodes.
Vnode
Virtual nodes are nodes which, like the virtual arcs, do not exist but must exist in the Giswater network so that it works correctly. Virtual nodes are always placed on top of arcs, but, unlike the nodes, they never divide the arcs into two parts.
The function of these elements is to place the gullies and connections that are at a certain distance above the network. These are specific elements that, as mentioned, are represented above the arc closest to the element referred to by the virtual node.
Link
Links are linear elements that relate gullies and connections with their virtual nodes located over the nearest arc, therefore, they perform the function of connecting the separated elements with the network.
Element
This category is available for other types of point elements not connected to the network, which the user can customize himself. It can be network accessories or any other element that is necessary for a representation with the highest possible degree of reality.
In addition to all these main elements, there are some other elements that do not have any topology but are interesting to visualize on the map:
Address: within this group there are all those elements related to the representation of the territory of the network. Normally there are the layers of street axis, municipal limit, perimeter of buildings and portals.
Dimensions: finally, we must mention the layer that represents the dimensions. This will only be filled in when the user uses the specific tool to measure distances between elements. They serve as a complement to the network to be able to see in detail the dimensions created.
To work correctly with databases that contain a big amount of information, a series of basic rules must be followed so that the data has consistency, and the usability of the database could be maximized.
Most of these rules have to do with the relationships between tables, which, as we will see more ahead, share many columns and fields. In relation to this we must consider foreign keys that allow the information of one table to be a part of another table.
In addition, it is also essential to understand the functionality of primary keys, the columns that restrict the repetition of fields.
If we check the script image above, it represents the creation script of the sector table, the primary key of the table is sector_id, which means that the content of this column can not be repeated in any case. This table also has a foreign key, which refers to macrosector table and specifically to the macrosector_id field. What does this mean? That the content of the macrosector_id field of this sector table must exist before in the same field of the macrosector table. For example, if in the macrosector_id column of the macrosector table we only have data 1 and 2, to fill the same column in the sector table we can only choose one of these two numbers.
This makes the relationships between tables narrow and many fields have restrictions when adding information for it to be correct. Besides the use of keys, in some tables there are also restrictions of the check type, which limit the possibility of adding data in certain fields only with the established values. The check restrictions are only found where is necessary, since they are tables that require specific values for the system to work correctly and therefore can not be modified.
As already mentioned in section 2.5.1.1, the use of hierarchical catalogs to categorize the elements is very important and this functionality can only be developed through the use of foreign keys. To add elements in a catalog, they must always be related to some type of higher hierarchy element.
To know how far the water supply and drainage networks reach, Giswater establishes different types of zones that limit the territories of which they are part. Each of these zones has specific characteristics and there are certain relationships between them, managed, as seen in the previous section, with foreign keys.
The following Image allows to understand the role of each zone and with which elements of the network are related to.
SUPPLY MAP ZONES
SANITATION MAP ZONES
The main zones are Sector and Exploitation, which serve as heads of the rest of the zones on the map, each one within its activity. The sectors are delimited with the sole condition of hydraulic coherence and may have great differences in their extension. A single sector can, for example, represent a single street or represent an entire municipality depending on the needs of each managing entity. The only necessary thing is that the sector has a place or several of water inlet and a place or more of water outlet. In a different way, the exploitations have a supply more linked to the territory and are made up of macrodmas and dmas.
All the main elements of the project must be located both within a sector and a exploitation. As shown in image above, some are only related to the exploitation and only the subcatchments must be indispensable within a sector. In no case may an element be unrelated to any of the areas on the map.
In an administration department or a company dedicated to water management the employees never work on the same issues nor, usually, a single employee oversees the entire water management process. As is normal, within the Giswater environment, a categorization can be done by different types of work based on the tables or views that one usually uses. Both Giswater and the PostgreSQL database allow the introduction of different work roles, to facilitate the use of the tools within a corporate environment where work is done simultaneously.
The aim of roles is to improve security, preventing users without permission from modifying data likely to generate errors, as well as allowing a customization of some aspects of the project depending on each user with a different role.
The roles available are:
All roles with a higher hierarchy automatically acquire lower role permissions, that is why they are sorted according to the importance and permissions they have.
To facilitate the work of the users when inserting data in the different tables and views of the project, Giswater has the option of adding default values to parameters that are mandatory or highly recommended. Through different commands, when a new element is inserted that has fields which have related default values, they are automatically filled in with the established value. The value established by default must always be of the same type as the field to be filled, otherwise the insertion will be wrong.
User’s default values are those that are managed through the config_param_user table. Usually, these values are used during the data insertion process.
Within config_param_user you can add parameters and the values that the program will use by default when filling in the corresponding fields. A clear example of a default value that can be used would be the municipality, in case of having only one, the value of the muni_id field would automatically be that of the only existing municipality.
The use of default values can greatly facilitate the insertion of new elements, but it is advisable to review all the values before definitely adding an element, as it is possible that some default value does not match the value that the inserted element should have. In the case of zones on the map, remember that the default value prevails over the geometry of the zone that Giswater automatically captures. For example, if a new element is going to be inserted within the perimeter of a sector=3, the program will capture that the sector would be 3, but if we have a default value sector=2, the element will be inserted with sector=2.
From the Giswater plugin itself, you can also manage the default values, using the Configuration tool.
The default system values are only modifiable by users with administration role. They are related to the configuration of tables and are usually used to manage the parameters of the different topological rules, which are described in the following section. Section 5.2.6 points out information with respect to the default system values, since they can be modifiable from the plugin Configuration tool.
The definition of geospatial topology says: "The topology expresses the spatial relationships between characteristics of vectors (points, polylines and polygons) connected or adjacent in a GIS." Once the meaning is known, we will see some of the main topological characteristics that are important for the use of Giswater in its GIS branch.
Before explaining the usual topological rules, it must be taken into account that Giswater has certain conditions in relation to the states of the elements, which we call state topology. In the following table you can see all the types of modifications (insert or update) between arc and node elements and if they can be carried out taking into account the state of the elements. Above the table you can see the different states available for the elements in Giswater:
The state type that has the most restrictive conditions is Planified. Operating with elements in state = 2 is only possible for users with the role of masterplan or higher and it must be kept in mind that the management of these elements can break the topology.
First, it is necessary to have at least one record in the plan_psector table, which is used to manage the planning. It is also essential to set a default value for psector. Arcs and nodes will be inserted with this default value in the specific tables: plan_arc_x_psector and plan_node_x_psector. It is important to check the state and doable fields.
All elements, whether nodes or arcs, which have On service state and the user changes them manually to Planified, will be automatically introduced in the default psector that is currently available. Although this change is allowed by the topological rules, it should not be usual to pass a On Service element into Planified.
The correlations between arcs and nodes are probably the most important at the topological level within Giswater, partly because of the large number of elements that come into play. For the program to work properly, it is necessary to fulfill these topological rules. The program itself shows messages to the user when an important rule is about to be broken.
The Giswater plugin has a specific tool that allows detecting certain topological errors related to the arcs and nodes. Later we will see how this tool is used, but in this section, we will explain the topological rules that are emphasized:
Orphan nodes: nodes that are not connected to any arc.
Duplicated nodes: nodes that are located exactly at the same place and that is why they produce incoherence in the system.
Topological consistency of nodes: there are some specific topological rules of Giswater, which consider the type of node. For example, there are types of nodes that must have connections with three different arcs, if not, they will be marked as erroneous.
Arcs with the same start and end node: the arcs must always be placed between two different nodes (with different id), therefore, an arc that starts and ends at the same node is incorrect. This can be configured from the config table and the samenode_init_end_control field, where if we have the value TRUE the program will not allow arcs with the same start and end node; if we have FALSE, these arcs will be accepted.
Arc without start or end node: Arcs disconnected from one of their ends.
Link elements are graphical links between map elements. What a link does is connect an input element (connec or gully, also called connections in general) with an output element (arc, node, connec or gully).
The attributes related to this graphic link are:
Input element
pjoint_id - Indetifier of the output element
pjoint_type - Output element type
arc_id - Identifier of the arc where the input element are finally conected with. If pjoint_type is ARC, pjoint_id and arc_id will be the same.
Output element
For WS arcs have a tab with their related input elements through arc_id.
For UD, arcs have a tab with their related input elements. Nodes have a tab with their upstream related input elements.
Link
feature_id - Identifier of the input element
feature_type - Input element type
exit_id - Identifier of the output element
exit_type - Output element type
Special features
Regarding its input element (which is upstream), the link shares most of its attributes:
The visibility of the map, that is, exploitation and state, is taken from it.
If the input element is deleted, the link is deleted (they are considered to be working as an integrated unit).
The link attributes, such as length, diameter or material, are represented and manifested in the data model of the input element to which it belongs.
Regarding its output element (which is downstream), there is no longer pertinence but simply topology, with which:
If the output point is moved, the link is also moved. If the output point is moved to another arc, the arc_id field of the input element is automatically updated.
If the output element is a connec or a gully, the arc_id value of the parent arc that has the output element is copied.
The dma_id and fluid_type attributes of the output element are passed to both the link and the input element.
For sanitation projects (UD) the dma_id and fluid_type attributes can be disconnected from the output element. To do this, the variables Connect autoupdate dma and Connect autoupdate fluid must be set to FALSE in the configuration.
Ways to connect with links
By default, when adding a connec or gully, it is disconnected from the network. For there to be a topology between the network and the connections, the links must be created. This can be done in the following ways:
Manually draw the link. They can be drawn, with the geometry that you prefer, only when input element is connected to an output element, using the usual drawing tools in QGIS.
Connect to network tool. Using the Giswater plugin tool explained in section 5.2.3.7, one or more connections can be connected at the same time. In this case, the link will always connect to the nearest arc in a straight line.
Connect automatically. There are configuration variables so that, when a new connection is introduced, it automatically connects to the network. The result will be the same as if you connected using the plugin tool.
In the connection forms there is a button (Set arc_id) that allows you to previously establish an arc_id. In case of doing so, the ways of connecting nº2 and 3 will result in the connection to the established arc and not to the one that is closest.
State feature
ON SERVICE and OBSOLETE
There can only be one link with ON SERVICE state for a connection.
There can be many links with OBSOLETE state for a connection.
Mapzone, exit_id and exit_type value are copied from connection to link.
PLANIFIED
For every connection in a psector a new link is created. It can be generated manually or automatically.
If the link is automatically generated, it could be modified in the alternative of the psector where we are working. The original link will never be modified.
It is not allowed to delete the arc_id of a planified connection. The whole link must be deleted instead.
Mapzone, exit_it and exit_type are showed with independence of the original connection, showing data which link and the planified conection has.
Giswater makes use of double-geometric elements. This means that a single element is formed by two different geometries, in this case they are always points that belong to a polygon.
Only some of the elements of the network have this particularity, because they are types of elements that can have much larger measurements than those that are represented with a simple point and therefore it’s interesting to visualize them as a polygon around the point.
When adding a new node of one of the listed types, a square polygon will be immediately created around the point element. The main topological rules of this relationship are:
If the node element is moved, the associated polygon will also move to the new position of the node.
If a new polygon is drawn, with the perimeter that the user wants and around a node of the same type, the new perimeter directly replaces the old one.
It’s impossible to draw a new polygon without a node of the same type being inside it.
If a node with double-geometry is deleted, the associated polygon will also be eliminated. On the other hand, the polygon can be deleted without modifying the node.
To work with this type of double-geometric elements it is important to set a configuration that manages it. You can enable or disable this function in the config table, insert_double_geometry field. If it is enabled (recommended), the buffer_value field assigns a default value of the side length of the polygon square. As already said, this square can be edited to have the desired shape.
To finish this section of basic work rules, an example scheme is presented to summarize all the work rules that need to be followed in the process of inserting a new node element. In the example scheme, the mandatory fields for insertion are defined and the steps to follow for the insertion to be correct can be viewed using arrows. The process is also shown in case insertion is not possible.
The field the_geom is one of the most relevants and in this case one with the easiest rules to understand. When inserting a new element, the geometry of it must be placed inside the geometry of a sector, a dma and a exploitation, otherwise the insertion will be erroneous.
If the state is 2, as mentioned recently, there must be at least one psector, otherwise the insertion will be incorrect. For elements with status "on service" (1), these must follow the topological rules explained in section 3.7.1.
The other mandatory fields may have default values or being entered directly by the user. The hierarchies and foreign keys for the catalogs of elements must be respected, which means that trying to insert a node that does not belong to the catalogs, we won’t succeed.
While all GIS systems are compatible with the Giswater tool, the same does not apply to the plugin since it has been programmed as a complement to QGIS. Thus, all the available functionalities will be executed from the QGIS environment.
Any user that requires the use of Giswater plugin must be familiar with geographical information systems (GIS).
Once the user has created a new data project, with the Giswater tool, as explained in section 2.5, he is already able to open the QGIS project and start working with it. In this manual the example project for water supply (ws_sample) will be used.
The main parts of the QGIS environment in relation to Giswater and its plugin are shown below.
The ToC (Table of Contents) is where all the necessary tables and views of the database are loaded to work with Giswater. To have the information well structured, this topic has been divided into seven large groups that will also facilitate the management of roles (depending on the permissions of the user, he should be able to manage certain tables, which by default belong to a group). These groups are: Inventory of assets, Operations and Maintenance (O&M), EPA Analysis, Masterplan, System tables and Base maps.
In this section all the tables and views that are loaded in QGIS are described, to facilitate the user understanding of the complex network of tables that Giswater is composed of. Each table has a variable number of fields with information related to what the table represents. As the amount of information in this section would be exceptionally large, most of the definitions of tables and fields are presented in the annex of the manual. However, the user will find below enough information to understand the purpose of each group of tables.
This group contains some information about the network assets inventory, and it is divided into four subgroups: Catalogs, Map zones, Network elements, and Others.
First of all, it is important to mention that the catalogs layers on the ToC are mainly distributed into two different subgroups. The first subgroup belongs to the Inventory Layers. This is where we can find our fundamental catalogs, which means preliminary information necessary to build our network system. The second subgroup belongs to the Admin layers, for which you can find more detailed information at the end of this manual chapter. There are other few catalogs on the EPA subgroup, which its content follows the EPA/SWMM hydraulic model logic.
An image with the two main subgroups that contains the catalogs layers, just as can be found on Qgis ToC, and the layers name on the DB manager can be checked on the images below.
Fundamental Network Catalogs (the name of the table in the database in parentheses)
Feature catalog (cat_fearture)
Feature node catalog or Node feature catalog (cat_feature_node)
Node catalog (cat_node)
Arc catalog (cat_arc)
Node material catalog (cat_mat_node)
Arc material catalog (cat_mat_arc)
Connec catalog (cat_connec)
Grate catalog* (cat_grate)
Grate material catalog* (cat_mat_grate)
Yellow colours just apply to UD schemes!
Pre-dependencies:
Catalogs generate many dependencies, in fact, they must be filled before starting to work since their records will be requested in many system tables. Also, it should be noted that the catalogs also have dependencies between them. In this sense, before filling the arc and node catalogs, the preceding catalogs, which are the node materials and the arc materials, must be filled out. Before starting to work on the catalogs, the system tables that typify the different elements of our network must be filled in (see section 2.5.1.1):cat_feature_node (for the node catalog case)cat_feature_arc (for the arc catalog case)cat_feature_connec (for the connection catalog case)cat_feature_gully (for the case of gully catalogs in UD)Although they are not loaded in QGIS, it is important to explain at this point how the higher hierarchy catalogs, already mentioned in section 4.2.1.1, work. It is explained as an example for node, but the explanation can be extrapolated to arc, connec and gully.
Cat feature node (cat_feature_node): The table characterizes the different types of node that our project can have. The type of nodes that the system allows - type field, from now on 'system node type' - is not modifiable or expandable. What you can do is have as many node type elements as you want - id field, from now on 'custom node type' - with the same system node type attribute, as long as this attribute is in the system.
It is important to know that:
Each 'system node type' has a defined data model, different from the others. If you want to create new records of node types, you must first analyze which of the different data models of the system nodes best suits the new 'node custom type' that we want to create.
For each 'custom node type' we can define a default value of the element type in the hydraulic model. This default value is MANDATORY, but for each network element it can be modified at any time by the hydraulic engineers.
The 'custom node type' allows us to customize the names of the elements in the language we want. This allows that, although the system always works with the 'system node type' this will always be transparent for the user who will never see the 'system node type' but will always work with the 'custom node type'.
To know how the catalogs work and their relationships through foreign keys and other restrictions to give consistency to the project you can check the Image below, that schematically represents the hierarchy under what the item catalog tables follow.
The first group of layers of the assets inventory is the one related to the zones of the map. As its name very well indicates, this group of layers represents and delimits the different territorial zones of the map, already defined in the section 3.4 of this manual.
All the layers in this group have polygonal geometry - except for macroexploitation, which only appears in a table format for WS projects. It is a particularly important group of layers, since one of the basic rules of the project is the need of every element of the network to be within one of the different zones.
The exploitation, specifically, is essential to start any project. As mentioned before, it is highly recommended to add an exploitation value in the properties of the project, using a variable. Thus, the project will be causally related to an exploitation, the area of the map that, in general, will cover a larger area.
The map zones that Giswater has are the following:
Exploitation: exploitation area, usually related to a management area of one or more users.
Macroexploitation: group of exploitations.
Dma: in the case of WS it is district metering areas, areas to account for the water usage. For UD it is district management areas, management areas of sanitation network. In both cases, they can be delimited according to the needs of the user and always with a coherence of use.
Macrodma: a group of dmas.
Sector: the sectors are related to the correct functioning of the hydraulic model and therefore they must be consistent with the water inlets and outlets of it. They are delimited according to this coherence as the user considers appropriate.
Macrosector: a group of sectors.
The complete tables of this section with a description for each field, as well as the interpretation criteria used, are found in the manual annex.
This group contains all those layers referred to the network elements, which have geometry, i.e., and are graphically represented on the map.
Once the corresponding catalogs have been completed, the construction of the network can be started by editing these layers. Always following the order marked by the topological rules, as explained in section 3.7.
The elements of the network are divided into five layers plus a group for the polygons:
Node (v_edit_node)
Arc (v_edit_arc)
Connec (v_edit_connec)
Gully (v_edit_gully)
Link (v_edit_link)
Polygon element group
To enjoy the use of GIS, each element has its own associated style that will be displayed in the graphical interface of QGIS. The styles are represented according to the specific type of element (to know which they are, we can consult the sys_feature_cat table).
In the case of network elements, the differences between project types are exceptionally large. There are very few elements that coincide both in supply and in urban water drainage; that is why no table in this group will be described as a commune.
The elements that are not strictly a part of the water supply or sanitation network but do have a visual representation on the QGIS map, i.e., they have geometry, are in this group. The data of these elements is not indispensable for the use of the hydraulic models which Giswater incorporates, but its information can have interest in other aspects, and, therefore, it is also necessary to get to know its characteristics.
Common elements
Dimensioning (v_edit_dimensions): this table is filled in when the user uses the plugin tool that allows to calculate distances and dimensions between different points within the QGIS map. The distance is represented by a line and a label with the numerical information in meters. It also shows the depth in case of associating a value to it.
Samplepoint (v_edit_samplepoint): layer with information about sample points. These are the points where the water quality that circulates is analysed. It has a field that relates the sampling point with a laboratory.
Element (v_edit_element): can be any other type of element that needs to be defined in the element catalog. These may or may not be linked with other network elements. They allow to add extra information in relation to some characteristic.
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
The first group of layers which can be found in the ToC of the Giswater project inside QGIS is the operations and management (O&M). Unlike the previous group (inventory of assets), which has many layers, this one is reduced to a simple group of 2 or 3 layers depending on the type of project and the inventory of visits, common for both types of projects.
The layers of operations and management are:
Visits (v_edit_om_visit)
In this layer all the completed visits made to the network are found and visualized by means of specific elements on the map. Each visit has a start and end date, as well as an identifier of the user who made the visit. Each visit can contain different events and in the same way each event can have several photographs to illustrate the event. Events are not found in this same layer, but they are related to visits with foreign keys.
The mincut layers propose to the users the valves that should be closed in case of wanting to do some type of operation on any element of the network. Based on the different states and attributes of the elements, the cut polygon will be one or the other. There are several parameters that come into play when using this tool. Mainly we must consider the state (state) and exploitation (exploitation) of the elements that are displayed on the screen, because the tool will be used only in the visible elements.
Since obsolete elements do not have topology (they are not connected to the network), it’s recommended that they are not visible when the tool is used; the elements with state ‘on service’ can be used without any problems to make the cut polygon and, finally, the planned elements can also be part of a cut polygon but we must pay special attention as these can be placed on top of other elements in service and cause errors in the cut polygon.
The layers that are loaded in the QGIS map are those related to the results of the mincut polygon according to its geometry and type of element, with its own symbology:
Mincut init point (v_om_mincut): represents the starting point of the cut polygon, where the user has clicked for the result to be calculated.
Mincut result valve (v_om_mincut_valve): results of the cut polygon that represent valves. The proposed field establishes whether a valve should be closed or not.
Mincut result arc (v_om_mincut_arc): results of the cut polygon that represent arcs.
Mincut result node (v_om_mincut_node): results of the cut polygon that represent nodes.
Mincut result connec (v_om_mincut_connec): results of the cut polygon that represent connections.
The flowtrace layers show the user the elements of the network that are upstream or downstream of a selected element. The layer updates its fields each time the user performs a new operation to find out the affected elements and these, through a specific symbology, are represented on the map so that they can be easily consulted. As in the cut polygon tool, all the elements that are visible on the map come into play here (they are within the editable views of node, arc and connec).
The use of this tool is relevant in two different cases:
Data structuring phase: if there are arcs that go in the wrong direction, it is easy to detect them by using the flowtrace process, because they will cut the network in an unusual point so its direction can be modified and thus correct the error.
Consultation phase: it allows to visualize all the elements that are upstream or downstream of a specific element.
There are 2 layers and 4 different symbologies:
Flowtrace arc (v_anl_flow_arc): represents the arc type elements for the flow tracking tool. Shows with the corresponding color the arcs that are upstream (flowtrace) or downstream (flow exit) of the selected element.
Flowtrace node (v_anl_flow_node): represents the node type elements for the flow tracking tool. Shows with the corresponding color the nodes that are upstream or downstream of the selected element.
In the section 5.2.2 the use of the plugin tools that are related to this group will be detailed. The Giswater database contains many other tables related to the section O&M, but these are not found in the homonymous group of QGIS, as they will be used in other ToC groups or for various program processes. The purpose of the operations and management tables is to do an inventory and schedule the visits made by technicians to the real supply or sanitation network to control, calculate or do any type of rehabilitation or repair in the network.
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
The fourth group of layers found in the ToC is the one related to the hydraulic model (EPANET / SWMM). The behavior of this group is based on the program with the same name, public domain and developed by the United States Environmental Protection Agency (EPA).
This is an exclusive group for water supply projects (WS).
The layers of the EPANET group are divided into two groups:
Input data: are all the layers with necessary data for the correct work of the hydraulic model. There are different groups within Input data according to the nature of the data and the type of geometry:
Node: formed by geometric layers of node type and related tables.
Arc: formed by geometric layers of arc type and related tables.
Controls & Rules: tables of different rules and controls related to data.
Options: different tables of options related to the hydraulic model.
Tags and Labels
Output result: are all the layers that store the results once the hydraulic model has been done. They allow the results to be quickly visualized within the QGIS map and compared with older results. The results (tables with the prefix rpt) are divided into:
Node minimum values
Node maximum values
Arc maximum values
Energy usage and Hydraulic status
In chapter 7 of this manual the user will be shown how to implement the hydraulic model of their network through the layers and tables that make up this group.
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
Storm Water Management Model (SWMM) is the third group of layers found in the ToC of an urban water drainage and sanitation project (UD). It is the "brother" of EPANET, also developed by the EPA, but whose use and applications are obviously different.
The layers of SWMM are structured, like EPANET, in layers and tables of entry and exit, adding an intermediate group that will allow the user to establish which sectors and hydrological basins come into play when making the hydraulic model:
Input data: input data for the SWMM model. As there are a lot of parameters, they are grouped according to their nature:
Climatology: in this group, data related to the weather are introduced that may influence the water flows before it reaches the network.
Hydrology: referred to data related to water flow that enters naturally into network (runoff), such as rainfall, aquifers, infiltrations, or thaw. There are two layers with geometry:
Subcatchment: represents subcatchments as polygons
Hydraulics: in this group the different elements of the network that are necessary to carry out the model come into play. They are divided into nodes and arcs, each of these related to other tables without geometry that contain additional information.
Node: elements such as Junction, Outfall, Divider and Storage. The additional tables refer to external contributions of flow that go directly to the network. There are three types:
Inflows – series of flow values that go directly into the nodes defined by the user. They are used in case of the absence of runoff data.
Dwf (Dry weather inflows) – continuous flow inputs that reflect the contributions that sewage flow makes to the network. They can be considered as reference flows of conduits.
RDII (Rainfall-Derived Infiltration/Inflow) – flows from rainwater that are introduced into the network due to direct contributions in the connections with the wells, collectors of pumps or in case of breaks in pipes or bad connections of the elements.
Arc: elements such as Conduit and Virtual arc. There are also tables referring to the cross sections, which describe how the bottom level of a duct varies, and to flow regulators, which are devices used to control and divert the flows within the system. The orifices, weirs, discharges (outlets) and pumps can perform the regulation function.
Quality: this group of tables, without geometry, allows introducing data related to land use and pollutants present in the water. Land uses serve only to consider the phenomena of accumulation and carry-over of pollutants in the catchments.
Curves & Timeseries: the curves allow to establish the relationship between two quantities (in a similar way to a graph) so that this data is easily introduced into the network by assigning curves to the elements of the system. The time series serve to describe certain properties of some project objects that vary over time.
Input selected feature: this group is used, in case of having several sectors or hydrological catchments, to select with which of them the user wants to work. This is one of the tools that Giswater adds to the own uses of the SWMM program. If a specific area is selected to make the hydraulic model, this group of layers will show which are the node and arc elements that come into play: all those within the selected area.
Output result: the group of model results allows the user to view, both through elements symbolized on the map and through data tables, the results of the SWMM hydraulic model. As in EPANET, it is also possible to compare results with another model previously made.
Node flooding: refers to all the water that overflows a node, during the time it has been overflowing, the maximum flow during the flood, as well as the different volumes of water in m2. It is represented in QGIS like this:
Node surcharge: the overload occurs when the water rises above the crown of the highest conduit. It shows the data referred to hours of overload and maximum and minimum values.
Node inflow: represents the total flow input, both laterally and through links. Shows the total, temporary and maximum values.
Node depth: average and maximum depth of water. Maximum hydraulic height (HGL) and maximum depth time.
Arc flow: this layer represents the percentages of water flow in the network conduits. They are symbolized in QGIS as follows:
Conduit surcharge: in this layer the overload of conduits is represented. Only those with one or more non-zero entries can be displayed. A conduit will be considered overloaded when the slope of the HGL exceeds the slope of the conduit. Data about overload times will be shown in one or both nodes linked to the arc.
Pumping summary: different data referred to the operation of the pumps, such as maximum and average flow pumped, consumed energy, percentages of operation times, etc.
Flow class: classification of different categories of flows related to the arcs, for example, if they are dry in one of their nodes or if the level of flow is critical.
Arc pollutant load: relationship between arcs and pollutants.
Outfall flow/load: flows of outfall. Percentage of discharge time, maximum and average discharge flow, total discharge volume, etc.
Subcatchment runoff: total values of precipitation, evaporation, infiltration, depth, and volume of the escape of the subcatchment. It is represented by a break coefficient.
Storage volume: data reffered to the deposit. Maximum and average volume in the installation, percentage used, times of use and maximum outflow of the deposit.
Subcatchment washoff: total mass of each pollutant that leaves the subcatchment.
LID performance: They are the performances that have been obtained through the application of LID (Low Impact Development) techniques.
The rest of the tables found in this group do not have geometry, but they also provide data related to results of the hydraulic model such as quality and quantity of infiltration, instability indexes, surface water values, among others.
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
This4fourth group of tables and layers found in the QGIS ToC is used to perform budget calculations of the network. It is one of the main tools and with most potential of Giswater, since its use allows to realize in a very simple way different valorization of the water network and allows to systematize this process so that once all the necessary data is available the calculation is practically automatic. This means a considerable saving of time and work for the users responsible for carrying out such calculations.
For both WS and UD projects, the group structure is the same, but the data has some differences, since the nature of the projects is different. As throughout the manual, when any of the explanations is exclusive for a type of project, its membership will be specified.
There are two clearly differentiated parts within the Masterplan group:
Calculation of the equity value of the elements: in these layers the price is calculated for each element of every state (obsolete, on service or planned). All data is inserted into two views (v_plan_result_node and v_plan_result_arc) depending on the type of element.
Calculation of values of the planning sectors (psector): prices are calculated only for the planned elements. Each group of elements planned for a network modification operation must be inserted into a planned sector or psector. The objective of this group is to know the price of carrying out a planned operation on the network.
The first step is to assign prices to the elements of the network, to the materials, to the possible combinations of variables and, in short, of all the parameters that may have a cost to create the budget. In the same catalogs there are many of these values, which are transferred directly to the elements. The rest of the prices should be included in the two tables of the Prices group:
Prices: in this table are shown the simple prices for each parameter. Most of these are imported from the database and calculations of ITeC (Institute of Construction Technology). The unit field specifies the way to calculate the price (per unit, per cubic meter, etc.)
Compost price: shows variable prices, since the price of certain elements can not be calculated with a simple price, as it is made up of more than one part. Contains the id's from the previous table. The compost_id can be repeated since a compound element will be formed of more than one simple element (simple_id). The value column represents the percentage of simple element that makes up the composite element. By linking these fields, it will be possible to calculate the total prices.
To calculate the equity value, there is only one table inside the group of input data:
Arc_x_pavement: this table has, as its only objective, to establish the percentages of types of pavement that has only one arc. Obviously, an arc can have 100% of its length in the same pavement, but in opposite case, this table will be used to specify what percentages you have of each. As the pavements - which can be found in the pavement catalog (cat_pavement) - have different prices per square meter, knowing the percentages used in each arc of the network will finally make it possible to establish very precise patrimonial values.
ATTENTION: When you insert a new arc, the records are automatically inserted in the plan_arc_x_pavement table, without pavement values and percentages, but in this way all the arcs will be prepared to have values.
Once the price and pavement tables have all the necessary data, it is time to fill in the tables of results of the equity value. The importance of having complete data must be considered, some data are taken from different tables. Some come directly from the tables of the elements (arc, node) and must be correctly filled in for a right calculation. All columns are required, and all parameters are necessary.
There are two tables with the results of the calculation of the equity value, one for arc elements and the other for node elements. Remember that here the value data will be displayed for elements in any state type, whether it is obsolete, on service or planned:
Plan result node: contains the data of the calculation of the equity value of each node and is represented in QGIS as a punctual element with different colors depending on the final value.
Plan result arc: contains the data of the calculation of the equity value of each arc and is represented in QGIS as a line element with different colors depending on the final value.
The 4sectors, planification sectors, are areas with planned actions that affect different elements represented in the QGIS map. Obviously, if they are planned elements, their state must be planned (2).
The importance of this group of tables and layers is that it is usually difficult to calculate the value and price of operations of adding new elements to the network. Through these planning sectors it is possible to obtain the execution price of the entire work, as well as the detailed prices of each element.
Plan psector (v_edit_plan_psector): geometrically represents the different existing planning sectors. It contains additional data, such as priority or some fields of percentages such as gexpenses (added contract costs) and vat (VAT cost).
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
In m4sterplan, in addition to planning the network sectors, two types of prices that the network can have are also managed. These are the prices of reconstruction and rehabilitation.
To be able to have a reconstruction price assigned, it is necessary to have filled the fields of the catalogs provided for it, so the first thing to do is to fill them in. The next image shows a pipeline with its respective measurements, specifying all the parameters that come into play when calculating prices.
The fields that affect the calculation of the equity value are:
From the arc catalog (cat_arc):
z1 (m)
z2 (m)
width (m) - Total width. Width + bulk*2
area (m2)
estimated_depth (m)
bulk (UD (m) WS (mm)) - thickness of the conduit’s wall
cost_unit - Measurement units
cost - Price of the arc type. Related with price tables.
m2bottom_cost - Price of the type of soil. Related with price tables.
m3protec_cost - Price of protection. Related with price tables.
From pavement catalog (cat_pavement)
thickness (m) - thickness of the pavement
m2_cost - Price of the square meter of the pavement. Related with price tables.
From soil catalog (cat_soil)
y_param - Inclination of the slope of the trench
b (m) - Distance between the Conduit and the trench limit
trenchlining (%) - Percentage of intivation of the soil type
m3exc_cost - Excavation price. Related with price tables
m3fill_cost - Filling Price. Related with price tables
m3excess_cost - Excess transportation price. Related with price tables
m2trenchl_cost - Intivation price. Related with price tables
From node catalog (cat_node):
estimated_y
cost_unit - Measurement units
cost - Price of the node type. Related with price tables.
Once the work is done, the only part left is to link the elements with its catalogs:
ARC with cat_arc (arc.arccat_id), cat_pavement (plan_arc_x_pavement) and cat_soil (arc.soilcat_id)
NODE with cat_node (node.nodecat_id)
On the other hand, to assign a rehabilitation price, given the disparity of costs and cases, each operator must build its own rehabilitation algorithm, with which the option is ready, but is disabled as a series value.
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
This group of layers basically manages the different catalogs with which Giswater works.
Working with catalogs is one of the main features that Giswater has, and this is possible because we are in a database environment.
In fact, before starting to work on our project, we must build at least the arc and node catalogs to be able to introduce a simple record in the arc and node layers.
Its function is multiple. Among other characteristics, they allow us to catalog the information to standardize values, put economic value in each of the network elements or characterize the properties of the elements for use in the hydraulic model.
It is interesting to know that there are four types of catalogs:
Topological elements: Since the network is based on arc-node topology, the catalogs on which these elements pivot will be the most important of our network (node catalog and arc catalog).
Other network elements: The elements that complement our network are connec or element which have their corresponding catalogs.
Management: As a complement to the network catalogs, there are other tables in the database that also act as catalogs, such as the catalogs of: floors, builders, construction files, owners, pavement.
Hydraulic model: Necessary for the construction of a quality hydraulic model. In this sense, we have the roughness catalog, which allows us to differentiate roughness depending on the age of the material.
List of Admin catalogs (the name of the table in the database in parentheses)
Element material catalog (cat_mat_element)
Element catalog (cat_element)
Owner catalog (cat_owner)
Soil catalog (cat_soil)
Pavement catalog (cat_pavement)
Work catalog (cat_work)
Builder catalog (cat_builder)
Brand catalog (cat_brand)
Users catalog (cat_users)
Period catalog (ext_cat_period)
Hydrometer catalog (ext_cat_hydrometer)
Brand model catalog / Model catalog (cat_brand_model)
Node shape catalog (cat_arc_shape)
Arc shape catalog (cat_node_shape)
Blue and Yellow colors just apply to WS and UD schemes, respectively.
Work catalog: it’s a catalog of work records, for the operational control of the system.
The last group of layers of the ToC of Giswater is the one with base maps, which is the cartography that can be used as reference for the rest of the elements and that represents some parts of the territory. The incorporation of these layers to the project is particularly important, since it adds information that most users is used to see and therefore, they find it easier to identify to work with it. The base cartography is composed of:
There are different foreign keys between the street tables that give consistency to the data and restrict possible errors. The ext_address table must have the field muni_id of the ext_municipality table and the field streetaxis_id of the ext_streetaxis table. At the same time, the ext_streetaxis table also must have the field muni_id. As there are different municipalities, only each streetaxis can be related to the municipality to which it belongs with this field.
The origin of the data referring to base cartography has nothing to do with Giswater, but must come from other sources, hence the prefix ext in the layers, such as cadastral data services. These layers, despite their external origin, are completely integrated into the Giswater project and have more functionalities besides the simple cartographic representation of the elements, therefore they must have a specific structure, which can be seen in the annex of this manual. These functionalities will be reflected in section 5.2 but are basically of searching.
In the same way, if a user wishes to, more external layers related to the base map of the area can be added into the group to visualize other elements or anything that one wants to represent. In this case, any layer that is added will be completely external to Giswater and will have no relationship with other tables. Examples of layers that can be added here are a topography raster of Catalonia or an orthophoto.
In the manual annex, you may find the complete tables of this section with a description for each field, as well as the used interpretation criteria.
This chapter aims to present Giswater Toolbox, which can be applied to the identification and correction of missing or inconsistent topological data of the network inventory information.
Giswater toolbox is a very useful tool, as it enables the user, just by clicking on its tools, to visualize temporary vector layers that spatially show where are the topological and geometrical inconsistencies of the network. Moreover, through the attribute tables, the user can automatically or manually calculate the necessary corrections required for a hydraulic model to run.
By topological data, we mean all topological and geometrical relationships between nodes and arcs or other geometrical elements of the network. They have attributes values, like depth, top elevation, arc slope, and so on. These attributes are very well explained on the representative image below, for a UD schema.
This information can also be verified, element by element, using the info button. For nodes, it is also possible to calculate node depth and top elevation with the interpolation and extrapolation tool, just as shown below.
For example, for a CSS (combined sewer system - UD schema), the first changes on the network can be based on the DEM raster data, interpolation, or extrapolation of elevation values from nearby nodes by specific giswater tools. Then, after completing all the missing information for the node layer, another check on arc slopes and negative offset values can be done, by the use of Giswater toolbox. Changes in the arc bottom elevation when entering or exiting a node, or the node depth and bottom data, enable the user to easily set hydraulic consistent slopes and topological information for the nodes and arcs. All those changes can be saved as customer data, keeping, at the same time, the inventory data unmodified, when building hydraulic models.
Here below you can find some examples of the application of the toolbox for finding topological inconsistencies, and other typical geometrical incongruities on the inventory data of the network system:
CHECK PROJECT
2. Check arcs without node start/end
3. Slope inconsistency
One of the biggest and most notable improvements of the 3rd version of Giswater, comparing to previous versions, can be found in the plugin tools. Not only have new capabilities been added, but existing tools have been enhanced one by one.
The Giswater plugin is the part of the software with which the user should become more familiar since most of the actions that he wants to carry out can be done using the tools available in the plugin. In one way or another, everything you want to do on your network can be done using the plugin and the buttons it incorporates.
Giswater currently has up to 38 tools available, divided into different toolbars that must be associated with the six roles that exist in Giswater. In addition to these management tools within the projects, starting from the version 3.1.105, a button has been incorporated that includes the functionalities of creating, modifying, and updating schemes.
Button apart from the plugin toolbars:
Next, the functionality and objective of each of the tools will be detailed, apart from the general project management tool that was already explained in section 2.4.2 of this manual.
This group of consulting tools is related to the basic role of Giswater. They are tools that allow to select and consult the data, but still without the capacity to modify it. Even so, its use is especially important, since the fact of selecting one or another parameter, for example, the states of the elements, will modify the behavior of other tools.
The Giswater info button allows you to make an 'info' on the different elements of the supply and sanitation networks.
As a result of using this button, the info will return the custom form of the selected element. In addition, it is not necessary to have the active layer of QGIS that contains the element that we want to select.
This button will only work with the following layers of the ToC:
v_edit_node
v_edit_arc
v_edit_connec
v_edit_gully
v_edit_om_visit
v_edit_dimensions
Those elements have also an associated form, designed one by one according to their specific attributes fields. When using this tool, a form of the element will appear in your window, and you will be able to have access to more detailed information, distributed in different tabs according to their category. In general, forms are similar. The example of the image below represents the different parts of a form of a Node Element (manhole) of a UD project.
Forms of the elements
Data: information related to the element's own attributes. In the tables located in the annex of the manual, you can check the fields that each element has, which should be shown in this tab of the form. It is also distributed in different sections.
Main data: basic information common among most elements, such as start dates, codes, soil, elevations, and depths, etc.
Additional data: additional information of the element. It contains the address data and optionally added information.
Relations: shows a table of other elements that are linked only to this element. They are usually not connected to the network, as the main element must be large enough to contain its related elements. The relations, depending on the type of project and the type of element, can be:
Element: in this tab other elements are shown, not connected to the network, which are linked to the element that we are visualizing. From the form itself, you can link, unlink, and add elements of this type.
Hydrometer (only for connec type elements, WS schemas): relates connections with hydrometers and can show their values, besides connecting or disconnecting them.
Document: this tab shows the documents related to the element which is being visualized. Documents can be linked, unlinked, and added from the form itself, as well as categorized by date and document type.
O&M: the events related to the element we are viewing are shown. Each event is part of a visit, which can be consulted using a button within the form. You can also add visits, view photos and documents related to the events.
Scada (only for node type elements): related to the values that come from the SCADA system for the element we are viewing.
Cost (only for node and arc type elements): allows to calculate the cost of the element which is being visualized. For node-type elements, only two parameters come into play (price per unit or price per meter of depth). For arc elements, there are many more variables that are necessary when calculating the price and they are all specified in this last section of the form.
If you want to make info from any other layer, you will have to use the usual QGIS info.
The selector tool groups in a single button the different filters that can be applied to the visualization of the network.
Allows you to filter by:
Explotation
Network state (OBSOLETE, IN SERVICE, PLANNED)
Customer state (hydrometer tables)
Existing planning sectors
Hydraulic Sectors (to send them or not to the generation of the hydraulic model)
Its use is quite simple; You just have to go to the desired tab and select the values that we want to see or stop seeing. Automatically in our canvas we will see how entities appear or disappear depending on the filters applied.
The Giswater search engine allows to search and select elements of the network or the address. There are five different tabs within the search engine, each with different search parameters.
We will see tab by tab the use of the searcher:
Network (network elements): allows to search for specific elements of the network. First the type of element must be selected, and then write what we want to search for, either the id or an element type. In the drop-down all the available ones will be filtered showing their id and catalog. Selecting one of the filters will zoom to the element, which will be centered in the middle of the interface. It works with the project system layers, which is a reason to always have them loaded in the project.
Hydrometer: it allows to search for hydrometers, which must always be related to connecs. In the first drop-down list the exploitation we want must be selected. Then, it is possible to search among all the hydrometers of that exploitation. The hydrometer_customer_code, connec_customer_code and hydrometer state will be displayed. When selecting a record, the tool will automatically open the hydrometer form and will zoom in to the corresponding connec. All the parameters that are used in this browser tab are customizable by the user in the config_param_system table.
Address: the third tab of the searcher is related to the street map, loaded in the last group of Giswater layers. It allows to search for municipalities, streets, or specific portal numbers. To use it, the fields of the ext_municipality, ext_streetaxis and ext_address tables must be correctly filled out. First you will have to choose a municipality in the Municipality drop-down. You can then choose a street in the Street drop-down. Selecting a street will zoom to its extension. Finally, with the street selected, you can choose a street number from the Number drop-down. Clicking on a specific number will zoom to the specific element, centering it on the screen.
WorkCat (work records): it allows to filter the elements of type node, arc, connec, gully and element according to the work record to which they belong. In the drop-down list, the user can choose a record and after clicking on it, a form containing two tabs will automatically open. The first contains the elements that have the work record selected as the start record. In the second, those who have it will be displayed as a withdrawal file. By clicking on any row of the tables we can open the specific form of the element. In the lower part of each table a summary of the table is added, showing the total of elements of the same type, as well as the total length of the arcs that are part of the selected work record.
In addition, in this window it is possible to export the information presented in the tables into csv file. To do this you only have to set the save path and click in the Export to csv button.
On the map, we will draw a polygon that indicates the limits of all the elements of the network related to the selected work record, to which we will zoom. When closing the form, this polygon disappears.
Psector: The last tab of the searcher allows to search for the different planification sectors generated in the project. The use is quite simple: you just have to choose the name of the psector that we want to find in the drop-down tool. When you click, the form associated with the corresponding psector will automatically open, where we will have the possibility to edit the information, see the linked elements, add prices or documents, etc. The searcher also zooms to the geometry of the specific psector.
This group of tools is designed to perform or simulate actions on the actual network of water supply or urban drainage. Some of them will be used directly from the location of the element in the field, to report information on its status at the same time, others from the office, but always focused on the actual use of the elements.
This O&M toolbar is the only one of the plugin where there are big differences between WS and UD projects. There are some tools that are only for water supply and others that are exclusive for urban drainage. As usual, a clear distinction will be made when detailing the operations.
However, there are several common tools in this toolbar, such as those related to the management of visits and events. The visits to elements are made by a worker in the field, who can add the information directly to the tables specially designed for this function through a mobile device.
The mincut polygon functionality is surely one of the most important that a drinking water network manager needs to operate for its daily functioning. In this section it will be explained how the internal work logic of the database is developed.
The mincut polygon propagates flows from the elements that supply water to the network and then proposes the valves that should be closed in case of wanting to leave a specific point without water supply.
First, there are several previous aspects about the data that are strictly necessary for the tool to work correctly:
Pgrouting library is used for this process.
All arc and node elements must have state and state_type fields filled. The state type must be one that is operational. This can be seen in the value_state_type table in the is_operative field, which must be TRUE. In case of FALSE, the element will not enter the cutting polygon process.
The network traceability is made from the node_1 and node_2 of the elements type arc, that is why the network must have topology.
The identifiers (id) of arcs and nodes must be integer.
The table man_valve must have filled in the values closed and broken fields, which by default will be FALSE.
The cutting polygon works in the context of the exploitations system defined by the user in the table config_graph_inlet. This table must define exactly which are the nodes that provide water to the system (usually source or tank) and to which exploitation they belong.
The type of valves that participate in the cutting polygon must be configured. This can be done from the table config_graph_valve or through the plugin. Usually, they are only the shutoff valves.
For mincut there are three different types of states (not to be confused with the states of the elements of the network). These are defined in the table om_typevalue and are:
Once all the mentioned aspects are controlled the tool can be used. Clicking on the button opens the mincut form, where, in the first place we should pay attention to the top toolbar. Here it is possible to distinguish the mincut types and the configuration of the tool. In the configuration the types of valves that enter process can be selected.
As showed in the image above, there are three types of mincut polygon. The one with the most developed functionality is number 1, which proposes the valves to be closed to leave a specific location without water supply.
How to use the three types of mincut:
Network mincut – Class 1
To make a mincut polygon of type 1 the form must be filled (image below) with the different parameters:
Work order: work record (optional).
Street map: situation of the point that won’t have water (formed by the fields municipality, postal code, street and number).
Type: may be demo, real or test, depending on whether the water cut is going to take place or is just a test to see which would be the results.
Cause: Accidental or planned.
Start and end date: in this case they are to make a forecast.
User: name of the user assigned to this process.
Description: to add additional information in text format for the specific case.
With the cursor we must be placed over the desired point, which can be either an arc or a node. By clicking, the cutting polygon will be automatically made, which should show the valves that will have to be closed and all the elements that will be affected (sections, nodes, and connections).
To offer this information mincut has different tables where the results are stored depending on the type of element:
All these tables store the information of the element and the identifier of the cutting polygon and allow to clearly visualize on the map the affectation of the process, as shown in the above image.
With the completed polygon and knowing that all the marked valves can be effectively closed, it is time for the second tab of the form (Exec). By clicking on Start, the rest of the fields will be activated, the start date and time will be set, and the process status will change to In Progress. We can add an additional description during the process and other fields such as distance from the building or depth.
If it is a mincut test usually the duration will be noticeably short, as we only want to see the affectation; on the other hand, if the mincut is real, we can click OK and leave the process in this state until, when the time comes, by clicking End to finish and change the state to Finished. By clicking End opens another small form to specify, if necessary, the location and dates of the process. By clicking OK in this last form, this cutting polygon will be permanently closed and stored without the possibility of editing it again.
Connec mincut – Class 2
To perform a type 2 mincut, in the same way as in 1, the form must be filled in with the location, dates and mincut details. Then, click in the button to start the process:
At this moment, a small form is opened that will allow to select the connections to which the water supply will be cut (Image below).
To select them we have two options:
The button (-) allows to unselect the connections.
Once selected, we click OK and these will be stored as connections to be cut for the mincut that we have in process and they will be able to be visualized in the map through the Mincut result connec layer.
In the same way as for the Network mincut, at this moment the state may be modified. It can be left as planned, it can be started and left as in progress or finished.
Although this type of mincut polygon does not provide as much information as type 1, it is also important when planning network operations in cases where valves do not have to be closed, but the connecs will be.
Hydrometer mincut – Class 3
This last type of cutting polygon is similar to the previous one, but with an added level of detail. In this case, the hydrometers that are going to be closed are identified. It is useful for cases in which not all the hydrometers of a connection must be closed.
The flow of use is the same as in the previous case, but in this case the selection form has two filters: one for connections and another for the hydrometers that this one contains.
Since the hydrometers do not have geometry, it will not be possible to visualize the results on the map, but they will be stored in the Mincut result hydrometer table.
The mincut polygon manager complements the mincut tool. The goal of this tool is to store the different cutting polygons made in the project and allow the user to recover and visualize again the data referred to the existing polygons.
When we open the tool, we will be able to see a form with a central table where the polygons made are shown in rows, whatever their status (planned, in process or finished). Each row offers most of the information of the cut polygon: type, dates, street map, cause, start element, etc. The capabilities of the tool are as follows:
Filter by id, state, date, and exploitation
View the planned mincuts for the next days
Delete selected mincut
Open selected mincut: When opening a cutting polygon, we will be shown its form and, if it is not finished, we can edit the data. At the same time, the mincut results tables will be updated with the data of the selected process and therefore we will be able to see them again on the map.
Mincut selector: Next to the filter by mincut_id button there is a button that opens the mincut selector. After clicking, a selector will appear, allowing to see on the screen different cutting polygons at the same time. Consider that by having different polygons in the selector, the tables where the data is stored will also have more information differentiated by the mincut_id.
The longitudinal profiles are technical representations of a part of the urban water drainage system. This tool automatically creates longitudinal profiles of the area that the user wants. To choose which elements should be represented, the user must select a start node and a final node. The longitudinal profile will represent all the arcs and nodes that are between these two nodes (including themselves). In addition, there is an option of selecting an additional node which, in case the initial and final nodes have two possible routes, will mark the direction by which the profile should be drawn.
By clicking the button that starts the tool, a form like the one in the next image will open. Here the user can, optionally, establish a profile id. With the button in the bar at the top of the form, you can choose by standing on top of one and clicking, and then do the same in the second. Once we have values for these nodes, we will see how the sections located between the nodes appear in the list, which will also be selected on the map. Inside Parameters we can establish:
Vnode Min Dist: minimum distance between connections to be represented in the profile. If it is left as empty, all will come out.
Title: title of the profile.
Date: date for the profile.
At this time, we will be able to click the Draw button to create the desired longitudinal profile. The Clear profile button deletes the data we have selected.
The representation is a graphic type with a table of dimensions in the lower part. It shows the following data:
Elevation and maximum elevation of the node
Y max of the node
Material and diameter, slope, and length of arc
Data from the connections that arrive to the arcs
Mentioned title and date
This is an especially useful tool to obtain a graphic representation of the network in a quite simple way. It should be remembered that if any of the essential fields for drawing the profile is empty, the tool has customizable default values in the config_param_system table. These values are:
top_elev (node) / sys_elev (node)
ymax (node)
geom1 (cat_arc)
z1 / z2 (cat_arc)
cat_geom1(cat_node)
sys_elev1 / sys_elev2 (arc)
y1 / y2 (arc)
slope (arc)
In addition to drawing new longitudinal profiles, the tool allows to load existing ones. To keep a profile registered it must be saved using the Save profile button. All the ones which are saved can be displayed again by clicking Load profile through the main form of the tool.
This tool, specific for sanitation projects, allows the user to select a specific node of the network and show all the elements that are upstream of the chosen node. To show these elements, the tool selects all of them (by painting yellow) and it is possible to visualize them both in the graphical interface as well as in the attribute tables (where they are also selected).
This is the same process as the previous tool (upstream), but this time selecting elements which are located downstream from the selected node.
To make this selection, the tool searches in the nodes contiguous with the selected its maximum height and in case when it is higher (for upstream) or lower (for downstream) it selects it and continues the search until the end of the network. One of the goals of this tool is to help find errors in the network, since the elements upstream or downstream must have a coherence of heights so that water flows through the conduits. If the top_elev field of a node that should be upstream is smaller than its predecessor, the tool will stop, and it will not be selected. This can be understood more easily in the two images above, as on the right the section that should be upstream is not selected, therefore, there might be a problem with the heights. The one from the left it is shown as correctly selected.
This tool allows adding a new visit to our network, following a process in which said visit can be linked to one or more elements of the network, adding the events that have occurred during the visit and selecting documents from your computer to be related to the visit. By clicking on it, we are shown a form with four tabs:
In the first one, we can fill in the data of the new visit that we are going to create. Before doing so, it is necessary to have at least one value in the visit catalog (om_visit_cat), since each visit must be related to a value in this table. Only visit catalogs with active=TRUE will be available in this drop-down. Other data that are added are those related to the start and end dates of the visit, an external code for its management. Finally, it will be possible to establish whether the visit has specific geometry or is an alphanumeric record. With the Add geom button, the location of the geometry is assigned on the map (Image below).
The second tab relates the visit to events (Image below). As has been said, different events can be part of the same visit. These are actions carried out during the visit, such as repairing a crack or cleaning a section of pipe. The first dropdown is populated with the parameter types, which can be configured in the om_typevalue table (typevalue=visit_param_type). The second and third dropdowns are configured in the config_visit_parameter table, where each parameter must be related to its parameter type and a feature type (or all through ALL). Then we can insert events and add values to them.
The third tab of the form refers to the relationships with elements of this visit. If we wish to link new elements to the visit we are creating, we can do so with the tools on this tab. It allows you to filter by type of element and add by id or by selecting directly on the map (Image below).
Finally, in the last tab of the form, visits can be related to documents (Image below). These are external documents in ‘common’ formats such as pdf, doc or csv. In the text space it is possible to filter existing documents and link them to the visit. In case the user wishes to add a new document at this moment, it is possible to do so by clicking in the third button which appears in the tab.
This performs the same function as the Add Document plugin tool, which will be explained later. The other button allows to open the URL of the selected document.
When opening the visit manager, a form with a table containing all the visits made and some of their data is shown. This tool allows to select a visit and open or delete it. The user is also allowed to filter visits by date.
This tool allows the user to establish the value for the dates of operations and management.
By clicking on it, a small form opens where it is possible to select a start date and a final date, which will be used later for other processes. This information is stored in the selector_date table and will be replaced as the user uses this tool and modifies the values. The table allows only one set of date type values for each user, so that the same user can not have several dates available, only the last inserted value.
The purpose of this tool is to simplify the use of dates of visits. If a user wants to create a view related to operations and management, he can filter the date fields using those in the selector_date table, and it will be quite easy to update the values and use them as default dates. It is designed to establish values such as the following month or this week and use them in different scenarios.
To give an example of the usability of the tool, we will see how to generate a customized view that can be updated from the date selector. We create a view that shows us the valves, their geometry, and their construction date:
To visualize the results, we must load the view to our QGIS project. This view will be automatically filtered based on the value we put in the date picker. For example, if we select the dates from the beginning of the year 2010 to the present year, the view will only show us the valves with a discharge date (builtdate field) that are between these dates.
To sum up, any table that has date values can be filtered through this tool, thus achieving a quite simple method of representing information according to the needs of the user, who can customize the view.
The toolbar related to editing the network is the largest one. These tools are intended to facilitate the insertion, elimination, or modification of existing data, especially in relation to geospatial elements. This includes basic tools for adding nodes or arcs, moving elements, or connecting them together, as well as another block of tools to establish relationships with documents or additional elements.
It is a basic tool that allows to add a new node-type element to the network, both for water supply and sanitation projects. To perform the insertion there are two options:
Click on the arrow next to the button and select from the list the type of element we want to insert.
Use the keyboard shortcut to select the element type to insert. The shortcuts must be previously configured to use this function. To do so, we must fill the shortcut_key field of the cat_feature_cat table with the keyboard letter we want.
Once we have the type of node selected, we must place the position on the map that the new element will occupy. If we place the element in a place disconnected from the network there is no problem, but if we want to place it on top of an existing section (by snapping), we must consider whether it is a node that must break the section or not. This can be controlled from the cat_feature_node table, through the isarcdivide field. If this field is FALSE, the section where it is located will not be broken. In case of isarcdivide=TRUE, the section will be divided into two parts right at the insertion point. Here the rules of the state topology (3.7.4) come into play again: the insert will act in different ways depending on the state of the inserted node and the element on which it is located.
Once we have clicked on the site where we want to place the new node, the form related to it will automatically open. Here we must add the information regarding our new element. There are fields that are mandatory and therefore must always be filled to correctly insert; however, to facilitate quick insertion of elements, some of these fields can be filled in automatically thanks to the Giswater functionality. The exploitation, the dma and the sector of the new element will be captured directly in case the new element tries to be located within the limits of these zone layers.
The rest of the fields must be filled in manually or using some of the default values, which must have been previously configured.
Finally, by clicking OK will finish the edition and the new element will be inserted.
This tool allows to add a new arc to the network. The flow of using it is the same as of the insertion of a node, with the exception that in the case of arcs it must be drawn between two nodes. In case of not doing so, the insertion will be erroneous, since the topological rules says that an arc must have nodes at its ends. To draw an arc the first step is to click on the starting point and then draw different sections in desired direction until clicking again with the right button to finish the arc.
Once in the insertion form of the arc it is important to consider the differences that exist in some fields, since the arcs have specific attributes such as the length or the codes of the nodes. The other mandatory fields have the same usability as in the case of nodes.
Finally, by clicking the OK button, the edition is saved, and the arc is inserted.
The replace node tool aims to change an existing node to a new one. To do this, Giswater changes the status of the node to be replaced to obsolete and places one back on the same site with a status of service. The user can choose the type of node with which he wants to replace the previous one, as well as modify its data.
When the tool button is clicked the cursor changes its appearance and allows to select the node that is about to be replaced. Once clicked on the item, a form opens where we should choose the element's withdrawal record, as well as the withdrawal date. If the work record that we want to add is not created in the cat_work table, we have the possibility of generating one again directly from this tool by clicking the […] button.
In the second part of the form there are the parameters of a node; here the current node type is displayed. At this time, the new node type must be selected together with its specific catalog (a drop-down list that refers to the cat_node table). If Keep elements checkbox is marked, the elements and documents related to the old node will be saved for the new one.
If we want to check the result of this tool, it can be done using the state selector and we will see one node in a state on service (1) and another in an obsolete state (0).
This is an especially useful tool because it facilitates the process of replacing elements in the network, without having to worry about the topology since its position is exactly the same.
This tool allows placing nodes that are disconnected from the network on top of arcs. In this process, the arc will be divided into two parts, which will inherit the data from the old arc, but with new identifiers. It can only be done one by one.
The image below represents an arc that is a part of a network and a disconnected node. If we want to move this node and place it over the arc, so that it becomes a part of the network, this tool must be used.
We click the tool button and select the node 114451. Then we will have the possibility to draw an imaginary line towards the arc that we want to break and where we are going to place the node.
Finally, in the next image, we see how the node 114451 has been moved towards the arc and this has been divided into two parts, one with id 114536 and the other 114537. The old arc with id 2101 has been removed.
This tool does exactly the opposite of the previous one; It allows to eliminate a node that divides a section and thus join two arcs into one.
One of the requirements of this tool is that the arcs must be of the same type and belong to the same catalog, i.e., the arccat_id attribute must be the same to join them. The node can only be related to two arcs so that the tool can correctly develop.
It is important to keep in mind that if the node to eliminate has a TRUE value in the undelete field, it will not be possible to eliminate it. To do so this value needs to be changed to FALSE.
By knowing this, the flow of the tool is quite simple: with the active tool we must place ourselves on top of the node that we are going to delete and when we click on it, a window will open warning about the elimination of the node. If we accept this, it will be deleted and the two arcs with which it was related will automatically join into one with a new id.
The change node type tool allows to select an existing node and automatically modify its type and catalog.
To use this tool, click its button and then select the node which will be changed. After selecting, the modification form will open, where the current node type is shown and where it is possible to select the type by which it will be changed. The catalog of nodes will filter according to the selected type of node. By clicking OK, the change will be made, without modifying the rest of the element's data.
The usefulness of this tool lies in the fact that it allows modifying the type of node, a parameter that in the forms of the elements is not editable, in a quite simple, convenient, and fast way; without the need even to put into edition the selected node.
The Replace node tool and this one are similar; Replace node deletes the old element and inserts a new one one, with a new identifier. In contrast, this one maintains the identifier and does not cancel any element, it simply modifies its type.
As we already mentioned, the connections are related with the network, specifically to the arcs, through links, which draw a straight line between the connec and the nearest network section, where a virtual union node is located. The tool connect to network automates the process of creating these links and vnodes.
The goal is to connect to the network all connections that do not have a link. The tool allows to insert during one same process as many links as the user wants, which makes it an immensely powerful tool and very easy to use.
By clicking the button to start the tool, the cursor changes its appearance and allows to draw a rectangle, within which we must place the connections that we want to connect to the network.
At this moment, the connecs will be painted in yellow (selected ones), but it’s still possible to draw another rectangle to select more connecs if we want, because those that are already selected will not be lost. It is important to know that to deselect connecs we can hold down the shortcut keys of Shift + Ctrl and draw a rectangle that will act in the opposite way to the selection. Once we have all the connections selected, by clicking the right button of the mouse, a message appears indicating the number of connections selected. If we click OK, links will automatically be drawn from the connections to the network and the virtual nodes will be inserted at the intersection point, just as shown on the next Image.
The purpose of the dimensioning tool is to offer the possibility of calculating distances within the map, either in relation to elements of the network or with elements of the base map. It is also possible to use the tool in spaces of the map where there is no layer.
As has been mentioned in previous sections, the dimensions have a linear geometry layer that is represented on the map through a view (v_edit_dimensions). This allows that the values that are being stored can be represented on the map, offering additional information which may be valuable for networks with particularly accurate digitization.
How to use this tool? By clicking the button that activates it, the cursor will change and then we must click on the point where we want to start the dimensioning. Next, we must click on another site, so that a line appears joining the two points. If we want to finish the dimensioning at this point, by clicking the right mouse button will end the dimensioning. In case we want to make a dimension with more than one segment, we can continue drawing lines by clicking with the left button.
Once the line is finished, the form opens, where more data may be introduced.
If we know the distance of the dimension we are making, we can enter it in the Distance field. If we leave the value blank, the tool will calculate the real distance. If we know the depth at which we want to make the dimensioning, we must fill in the Depth field. Otherwise, we have the option to select a node or connec from the network and use its depth.
In the two following images, we see examples of the different types of dimensioning symbology according to the project's zoom.
Many times, the elements of the network will be susceptible to having linked information found in documents external to the database and to QGIS. As has already been seen in other sections, this is possible with Giswater since the element forms have a specific tab where documents of all kinds can be added and linked.
This tool aims to link documents with one or more elements of the network, which can be opened and visible directly from the plugin and its forms.
By clicking on the tool button automatically opens the form to add a new document (Image below). Here the data of the document must be inserted: id, type, observations, and the link with the path of our computer.
Next, in the Relations tab, we select all the elements with which the new document will be related. Nodes, arcs and connecs must be chosen separately. They can be selected in the usual ways: with the buttons (+) and (-) they are added and deleted in the list of elements, through the id, and with the selector on the screen we can create a rectangle to select different elements at the same time.
In the example of the next image, the document is being added in this process, linked to the node with node_id 1019.
To verify the correct linkage of the document with the node, the form of the Junction element can be opened, where, in the Document tab, the linked document with doc_id 1 should be present. By double-clicking on the row the document linked will be automatically opened.
This example has been carried out with a single element, but it is just as easy to link a document to one as it is to many elements.
The document manager is a tool used to inventory, visualize, filter, and delete all the documents that have been linked to any element of the network.
In the form that opens by clicking on the tool button, we can see a table with all the available documents, which shows the following data:
Id
Document type
Path
Observations
Date
User that added the document
With a double click over the row it is possible to open the specific document.
In the upper part of the form, the documents can be filtered based on their id. Next to the filter we find the button to delete the document that we have selected.
This tool is reasonably like the Add document since they share the same goal of linking something with the elements of the network. The difference in this case is found in the type of object which is to relate; If an external document has been added before, now we are going to link other elements with the network, elements that can complement the information. In section 3.2 it has been defined that they are the elements and we also know that they have their own catalog, therefore, if we want to add a new element, we must relate it to one of those defined in the elements catalog (cat_element).
By clicking on the button to start the tool a form to add a new element will open (Image blow). Here the data of the new element must be entered, many of them are selectable in different drop-down lists. We also have the possibility to add the geometry of the element.
Once the data is entered, in the Relations tab, the new element must be linked with the other elements of the network (arc, node, connec) we want. To do this we can follow the same steps as the Add Document tool.
The element manager, like all the management tools presented before, serves as an inventory of the elements found in the project. It allows to see all these elements and their attributes.
By double clicking on a selected item its specific form opens. In addition, there is an option to filter by the element_id field and delete elements with the Delete button.
This tool aims to remove elements from the network, i.e., change its status to obsolete. To do this, the elements must be on service. It is also necessary to consider the topology rules when deleting elements, since it will not be possible to do so if, for example, the selected node is connected to other arcs. The elements to be cancelled will have to be disconnected from the network.
In this case, Giswater permits an exception. The users can disconnect arcs that have associated connec-type elements, so that the arc will be disengaged and the related connecs will lose their link with the arc. This allows to facilitate the editing of the network in cases where it is necessary to cancel an arc and losing the relationship with the connec is not important. To prevent, the program will always show a list of all the elements that will be disconnected before proceeding.
By clicking on the tool button, the form to remove the item will open. First you must fill in some information about the withdrawal, such as the date or the withdrawal file (we can add one again directly). The next step is to relate the loss to one or more elements. In the Relations tab we can select the elements that we want to unsubscribe. Once selected and clicking OK will carry out the status change.
It is important to remember that the ‘ended’ elements will become obsolete, which does not mean that they will be eliminated. These will be equally visible if the obsolete elements are visible in the state selector.
This tool aims to allow the user to completely remove an arc, nodes, connec or gully. Many times, the elements of the network have relationships between themselves and with documents or visits.
When a user tries to delete an element using the usual QGIS tools, he may run into problems, since the Giswater functionality does not allow deleting depending on what relationships exist. This tool allows eliminating, even if these relationships exist, leaving the responsibility of the user that the network may be left with a broken topology, since the tool allows breaking topology (simply eliminating a node that is as the initial or final node of a section).
By clicking the button, a form opens where we must select the type of element to delete. Next, using the selection tool, we must choose which is the element to eliminate. The tool only allows you to work one by one.
With the element selected, we must click the button 'Show element relationships', which will show us all the links that the element has, either with other elements on the network or with visits or documents. This can help us decide if we really want to eliminate it, since we are going to lose all these relationships.
If we are convinced of deleting, to finish the process we must click the button 'Delete selected item'.
Draw a circle is the first of the two CAD tools that Giswater has. They are grouped within editing role, although they are in a small bar separated from the rest of the editing tools.
The goal of this tool is to draw a circle around a specific point with a radius set by the user. This circle should serve to draw support points when digitizing the network.
To facilitate the use of this tool it is necessary to have configured the snapping of QGIS, since it will only be possible to draw circles using as reference elements configured in the snapping.
When clicking the tool button, the cursor will change shape and then we must place it above the position where we want to put the center of the circle. Next, the program will give us the option to establish a radius for the circle; When we enter this value, we must click Accept and the circle will automatically be created.
This circle and the rest of the elements that are generated with the tool will be stored in an auxiliary view of the database (v_edit_cad_auxcircle). If we consider that the view already contains too many unnecessary elements it is possible to eliminate them by clicking the Delete previous circles button and so the view will become empty at the end of the insertion of the new circle.
Knowing the radius of the circle and using its geometry as a reference, thanks to the snapping, we can insert reference points that will help drawing new elements in exact locations.
The second CAD tool of the Giswater plugin is the one that allows inserting a point element at a distance (x, y) relative to another point on the map. The point of support generated should serve as a reference to draw new arcs and nodes of the network.
To add a new relative point using this tool, we must click on the button and then mark two points on the map, either on top of other elements or on empty points. The imaginary line joining these two points will serve as a reference to enter the relative point. Once selected, a form will open where to set the distances.
The X distance will be the position where the support point will be located respecting the x coordinate of the beginning of the imaginary line. The Y distance will be the position where the support point will be located with respect to the y coordinate of the beginning of the imaginary line. Using the two distances, the element can be located. Both values admit negative numbers, since only then can points be placed in all directions.
If we click From: Init point the distances will be taken from the point which was clicked as first
In the case of End point, the distances will be relative to the second clicked point by the user.
All the support points created in a project are stored in an auxiliary view, in the same way as in the other CAD tool. In this case the view is called v_edit_cad_auxpoint and itt can be found in the BASEMAP group of the ToC.
The group of tools related to the hydraulic model is the one which will be used by specialized users in the management of hydraulic behaviors in the distribution or sanitation networks. In addition to knowing the use of the four tools that make up the group, the users should also be clear about the data that is necessary for the models to work properly. These data are described in sections 4.2.3 and 4.2.4. The characteristics and specific operations of the hydraulic model are explained in detail in section 7 of this manual.
Go 2 EPA is the group's main tool for exporting the hydraulic model. Its goal is to obtain the results of this model, by filling in the corresponding tables and views, so that they can be automatically visualized in QGIS through a specific symbology.
Before using the tool, it is necessary to enter the mandatory data in the group tables of EPANET (WS) or SWMM (UD), depending on the type of project which we work with. The tool has many similarities between both types, although there are parameters that are only specific for one type or another.
FIRST PART - SPECIFIC
When opening the tool, the main form opens, which has two buttons, designed to define parameters prior to the process (Image below).
The first button is the selector of demand scenarios (7.1.1.2), which allows selecting a specific demand scenario, previously defined, to act on the exportation of the model. The performance is the same in all tools of 'selector' type, allowing to move different scenarios from one column to another.
The Options button, which appears in second place, is where the user can define different variables related to the hydraulic model.
All these fields are similar to those used by the EPANET program, therefore, the user in charge of this process, by knowing the hydraulic operation, should already know how to fill in or modify the fields or if it is necessary to modify some of the values that are predefined when opening the form.
Without a doubt, the most important widgets that control the export are those marked in red. See chapter 7 - EXPORT - IMPORT OF HYDRAULIC MODEL for more information
The tool is considered the same for both WS and UD, but, as already mentioned, the data, processes and results are different. If the project you are working with is sanitation and water drainage, then the tool form will be a little different.
In the options buttons prior to the process, instead of the demand scenario selector, we will find the hydrology selector, defined in the cat_hydrology table.
Regarding the Options, these are very similar to those of the SWMM program, therefore, knowing these, the form can be filled in correctly.
SECOND PART - COMMON
The second part of the export/import process of the hydraulic model is carried out after the first one, i.e., once the database has the hydraulic data and the options of the specific part are correctly configured.
At this time we will focus on the 'File manager' section of the Go2EPA form .
There you must define the name for the corresponding export, as well as establish the paths on your computer where to store the inp and rpt files that will be generated at the end of the process.
The Result Manager tool allows the user to visualize the data of the different results of the import and export processes of the hydraulic model.
The form of the tool shows, for each row, different data of each one of the model's results. As always, filtering based on the result_id field is possible, and rows can be eliminated.
This tool is used to establish which results of the hydraulic model will be displayed in QGIS at that moment. The data of the chosen result will be the ones that fill in the different views present in the project, so it will be possible to see results of old processes, sectors, or specific scenarios.
One of the highlights of the information management regarding the hydraulic model that Giswater does is the possibility of using data from two different results at the same time; one of main and another that serves to compare and visualize the existing differences.
With this tool it is also possible to select the result with which the main one will be compared, so that the data will appear in the comparison tables. These have the same style as the main results; therefore, it will be possible to play with both groups and compare results.
The functioning of this tool is remarkably simple: simply select the main result in the first combo box, which will show all available results. In the second combo box, the result that will serve as a comparison is selected. By clicking the OK button will update the data and can be used.
The planning tools are specially designed for users in charge of issues related to budgets (both at the level of individual elements and of actions with multiple effects) and the management of planned sectors of the network. For the correct functioning of this group of tools, the project and its data must be specially configured and with great accuracy.
As already explained in section 4.2.5, referring to the tables related to planning, the first step of all is to fill in the price data of the elements. The prices should be inserted in the Simple Price, Compost Price and Value Compost Price tables and these will be linked to the elements present in the results tables of their category:
Plan result node
Plan result arc
Plan psector x node cost
Plan psector x arc cost
If in the planning operations an economic planning should be carried out, it is necessary to fill all the prices of the fields of the tables that are related to it. For more information, see section 4.2.5.
The different tools that make up the masterplan group are explained below.
This tool aims to allow the user to create a new planning sector and assign the elements with which it will be related, as well as show the cost details of the set of operations that would be necessary to carry out the project.
First, when we open the tool, the psector form appears (image above). This form is similar to the one that each specific element of the network has but referring to an entire sector of the map and therefore to several elements.
In the initial tab the basic data of the psector must be entered: name, priority, exploitation, and sector to which it belongs, type and other observations.
The moment we click OK, the planning sector will be created. At first it will appear without geometry, but the moment it begins to have relationships with elements, a polygonal and rectangular geometry will automatically be generated around the linked elements.
To link the network elements to a psector there are two ways:
When inserting a new element with a planned status. It will be causally linked to the planning sector that is selected as default at the time.
Through the Relations tab of the form (Image below) elements that will be part of the psector can be selected.
In this tab the information of the related elements will appear. It is important to look at the state and doable fields. State refers to the state within the psector, it is not the state of the element in the network. The elements with state 1 will be displayed and those with state = 0 will not. Doable is used to establish whether the element will enter into budget calculations: TRUE will enter, FALSE will not enter. In many cases, the planning sectors need to incorporate existing elements in the network, which should not be used to calculate the price. The goal of this field is to allow such calculations. Those two fields will be filled automatically depending on the state_type of the linked element.
The third tab of the form is used to add to the budget of the planning sector the prices of any other parameters that are required to develop the work, apart from the value of the elements of the network. For example, the user can add prices for the transport of waste, excavation or any work that is necessary.
To select any of the prices and link it with the total budget of the planning sector you only need to click on the lower part of the form named ADD PRICES. The available prices are shown in the price_compost table. All those that are necessary for this budget can be added from here.
The tab Budget allows to see a budget summary of the planning sector. Here, the prices of the planned operations are detailed and presented in groups:
Total value for arcs
Total value for nodes
Total value for other parameters
General expenses (+19%)
VAT (+21%)
Others
With the sum of all these groups of prices the total budget of the project is generated.
In the lower part of the form there is the Generate rapports button, which allows to create external files with the information about the psector we are working. There are three options to generate reports, each of them individually selectable based on the interest of the user. The file in pdf format that can be generated by the QGIS composer can use templates that the user loaded into the project. Keep in mind that the template must be well configured so that the process could work properly.
The last tab, added in version 3.1 of the plugin, allows to link documents to a psector. These can be created again from the existing form or link.
The planning sector manager is a tool that allows to inventory, visualize, filter, and eliminate the existing psectors. In addition, it shows the planning sector which is selected as default now and allows to change it by another one. The default psector is an important parameter, since all the planned elements that are inserted will be linked to it.
In the form, that opens after clicking on the tool button, we can see a table with all the existing sectors and its data.
With a double click on the row it is possible to open the specific psector, where the user can put into practice all the functionalities of the previous tool. Unlike other Giswater management tools, this one serves as the only way to open the psector forms, therefore, it will be of remarkable importance when working on planning.
In the upper part of the form there is a filter, see the current default psector, change or delete any of the existing.
The network cost manager is a tool that allows to inventory, visualize, filter, and eliminate the different calculated network costs.
In the form that opens after clicking the tool button we can see a table with all the results, which shows the data of each of the results.
With a double click on the row it is possible to open the specific result, where the user will be able to see the related information.
In the upper part of the form, it can be filtered according to the result identifier.
This last group of tools of the Giswater plugin is formed by tools that can be used for different project related tasks. It is a heterogeneous group, with vastly different functionalities focused on general processes, unlike the rest of the toolbars that had much more specific role. Here there are tools that allow control, topology, value management, data import and functionalities focused on basic users to get the most out of Giswater.
We are going to see, one by one, the different tools that make up this bar.
The toolbox aims to offer a multitude of functions that may be useful when checking if certain parameters of the project are correct. The different functions offer different answers: some insert data in tables and others represent new geometries within a layer.
The new toolbox has a different form than the previous one, present in the last version of Giswater, since now it can be opened through a side panel, simulating the usual toolboxes in most GIS softwares. Here we can see, grouped by role, the different functions that are available for the user.
By double clicking on one of the functions, its form will open, where:
Input layer: input layer on which the process will be executed.
Selection type: the function can be passed over the entire input layer or only over a previous selection made with the QGIS selection tool.
Option parameter: some functions have configuration parameters so that the process is one or the other.
Info: description about the process functionality.
With new versions coming out of Giswater, new functions will appear in the toolbox, but so far there are 11, which are the following:
Check data form O&M process: It aims to find errors and inconsistencies in the data before using O&M processes. It will vary depending on the type of project; cutting polygon (ws), longitudinal profile (ud) and visit (ws and ud).
Check arcs with same start/end node: topological control assistant. To review how many arcs have the same node1 and node2.
Check arcs without start/end node: topological control assistant. To review how many arcs don’t have any initial or final nodes.
Check connecs duplicated: topological control assistant. To review how many connecs are duplicated.
Check inconsistency on editable data: It aims to find errors and inconsistent data in the editable data.
Check node topological consistency: topological control assistant. Helps the user to identifiy nodes with more or less sections that are connected to it, depending on the number of arcs that have been defined in the num_arcs column of the node_type table.
Check nodes duplicated: topological control assistant. To review how many nodes are duplicated.
Check node orphan: topological control assistant. To review how many nodes are disconnected from the network.
Check data according to the EPA rules: It aims to find errors and inconsistencies in the data before making the first export to EPA model. Checks the model tables of the mandatory data to perform the simulation. It works with all the tables that are necessary to carry out the process of exporting data to a hydraulic model. If there is still no EPA result in the database, this function can be executed directly. Subsequently, it can be eliminated with the results manager tool.
Check plan missing / wrong data before prices: It aims to find errors and inconsistencies before the first budget calculation with Giswater. Checks the price tables and the required data to perform the calculation.
Build nodes of arc without start/end node: Massive construction assistant. Creates as many nodes as necessary to comply with the topology rules. To do so, all the nodes will be inserted using the default user values (catalog, workcat_id, state, type of state and node type (ud)). Before executing the function, it is important to check that all the nodes will be inserted inside one of the zones of the map. If you want the nodes that are necessary not to be entered directly in the node table, to review them first, they can be entered in the anl_node table if we uncheck Direct insert into node table
Some of these tools are designed to review data after the complete migration process, during which some topological control rules are disabled to facilitate the insertion of elements. It is after the insertion of elements and with active topological rules that these functions can be executed for review.
Beyond this case, some functions should never return data, since the control of errors and inconsistency of Giswater will never allow, for example, that a section has no initial or final node.
Configuration assistant for the behavior of the plugin. It allows to define different parameters that are used in other tools and processes of the project. It is a tool of enormous importance and that all users should know well, since its use is recurrent and essential for the operation of Giswater.
The form of the tool is divided into five different tabs. The first of them is common. The second, Featurecat, will vary depending on whether the project is for water supply or sanitation, since it is based on establishing default values for the insertion of network elements.
However, the operation is the same for all tabs: each parameter has a checkbox next to its value. The user can set the value that he considers appropriate, following the filters that each parameter has. If the checkbox is checked, the value of the parameter will be active and stored in one of the database configurations tables. If the checkbox is not checked, the value of the parameter will not be used anywhere.
Within the tool we will find both default values configurable by the user and system values, which can also be modified or chosen by the user in the way that has been explained in section 3.6. Many of the values that can be configured with the tool are easily recognizable, however, there are some that are more complex and require a concrete explanation. Some of the most prominent values are explained below:
Other:
Keep opened edition: if it is marked, in case of insertion of a network element, the edition of the layer will remain opened. Otherwise, it will close automatically.
Connect connecs to network: if it is marked, when you insert a connec or gully type element, it will connect directly to the nearest section through a link.
Force link & vnode downgrade: if it is marked, when we change the stauts to obsolete or remove a connec or gully element, the corresponding link and vnode will also be affected.
Topology:
State topocontrol: activate or deactivate the topological control of states.
Arc same node init end control: controls those arcs with start and end ends located at the same node.
Arc searchnodes buffer: manages the tolerance when connecting ends of the arc to the nearest node.
Node/connec proximity control: allows or not the insertion of very close nodes/connecs, using a tolerance value.
Double geometry enabled: allows the automatic insertion of double geometry elements and controls the area that the generated polygon will occupy.
Link search buffer: allows to establish a tolerance to perform a buffer relative to a link.
Neighbourhood proximity buffer: allows to establish a tolerance when making a buffer that looks for elements considered as neighbors.
System:
Scale zoom: controls the scale at which the elements will be zoomed when the Search tool is used.
Many times, it will be probable that we have data from our water network that is in table formats, such as xls or csv. Giswater incorporates this tool in its plugin to offer the possibility of importing directly into the schema tables the data contained in a csv file.
To show the functionality of the tool, we will use as an example the possibility of importing a price table, which will be incorporated directly into the price_compost table of our schema. To do this, the program has a function specially designed to carry out this process. Every import of csv files must have a specific function.
We are going to see, step by step, how to use the tool to incorporate new simple prices to our database:
1 - We must have a .csv file ready to import. This means that it must meet the requirements of the tool and the Giswater function, otherwise the data will not be incorporated correctly. To know these requirements, we must open the tool and, at the top, select Import db prices as Import type.
2 - We prepare our file based on these requirements.
3 - Within the form, with Import db prices selected, we assign a value for Import label, which will be the name that the import prices will receive and will be incorporated into the simple price catalog (Price_cat_simple). For this example, it will be: Test Giswater.
4 - Next, we add the path of the prices2.csv file and select the encoding and the delimiter, which can be 'comma' or 'semicolon'. The table below shows us a preview of what the data to be inserted will be like (Image below).
5 - Click the OK button and the import is carried out.
6 - The function is parameterized so that the data from our correctly structured file is incorporated directly into the price_compost table, so that the columns of this table coincide with those of the import. As we see in the next image, the data is perfectly added to the table, with all its records and with the price catalog (pricecat_id) as Test Giswater, which is selected from the price_cat_simple table where it has just been incorporated.
At the end of the tool process, it has been possible to link the information we have in a .csv file to specific tables in the database. At this moment, the data found in the price_compost table is available to be used in other Giswater tools and processes, for example, when making budget calculations with Masterplan operations.
Apart from linking the price tables, the tool includes other specific functionalities to import csv files that refer to:
Import addfields: to link custom fields directly to the man_addfields_value table. To do so, the table must have the id of the element, the parameter (referring to the custom field) and the value to assign.
Import elements: useful for linking elements associated with sections, nodes or connecs. A specific table for each type of element will be necessary to do the import; i.e., if we want to link elements to nodes, we will have to make a csv table with only node-type elements. The table must contain the id of the topological element, the catalog of the associated element, observations, additional comments, and number of elements. When performing the operation, the element and element_x_* tables will be automatically populated, which link the elements associated with the topological elements (node, arc, connec).
Import visit table: useful to link visits to any type of network element. There are specific functionalities in the Import type drop-down list, for each type of element, so the visits can be linked only to nodes, arcs or connecs depending on the selected type and the csv file.
This last utility tool is specifically developed to facilitate the printing of plans and maps. In addition, it also allows adding information directly to some of the fields that contain the corresponding print composer.
To use it, there must be at least one composer configured using QGIS tools. Once it is done, the quick print will allow us to draw a map of a specific area with the characteristics of the selected composer.
By opening the tool, we select a composer and then choose the scale of the map. Everything that is inside the box that appears on the canvas will be a part of the printed map. We have the possibility to move freely and place the box where we want, so that exactly the part that we want to take is shown on the map.
There is also the possibility of rotating the canvas using the tool, to allow even more precision while printing the selected area.
The more advanced users who also master the database, may add other values to this form, by filling in the fields, the information will appear directly on the print, placed in some part of the composer.
To do it is necessary:
1 - Add to the composer the text elements with the concrete ID. For this example, the fields are:
Title, description, author, date
2 - Open the table config_api_form_fields in pgAdmin. There are some fields with the formname=printGeneric. More of them can be added as showed on the image below:
3 - The field column_id must match the IDs that we have put in the composer. In label we will configure the label we will see in the form. In layout_order the order within the optional values. The rest of the fields will be like the ones that already come by default in the other rows, apart from widgetfuncion where it’s necessary to change gw_api_setprint to gw_api_set_composer.
4 - We go back to QGIS and open the tool. We select the configurated composer, in this case comp_giswater. We place the box in the desired place, moving the map below and using the scale and rotation fields.
5 - We fill in the optional fields with data so that in the end we see something like image below:
6 - We click Print and select the printer or export to pdf. Attention, remember to configure the printing of the page horizontally or vertically depending on how it’s done in the composer.
7 - If the print was saved in pdf it will be already available in the selected folder with the optional values set where they have been configured.
This tool aims to offer the user a detailed summary of the health status of their project.
The operation is as simple as clicking the button and this summary will automatically be generated and displayed through a form.
This form includes, in its first part, the information about the versions that the user has, both Giswater plugin and the database, as well as other versions such as QGIS, PostGIS, Postgres and their own operating system.
The second part shows the status of the project, i.e., the work scheme to which the QGIS project is related. Up to 3 information headers can appear here:
CRITICAL ERRORS: Errors in the data that must be immediately resolved, as they can generate important problems or inconsistencies in the operation of Giswater.
WARNINGS: Minor inconsistencies that are recommended to be resolved, but that their existence does not significantly affect the operation of the program.
INFO: All the processes that are controlled and verified with this tool appear here. You can check what they are. Appearing in INFO means that the process has returned an expected result.
The configuration and customization possibilities in the Giswater environment are exceptionally large, since it is intended to meet most of the needs of the different users by integrating all the processes in the same code.
Through the tables config_param_system (for system configurations, which will affect the entire schema regardless of the user) and config_param_user (for configurations per user) many work processes can be customized.
To know the different configuration variables, you can access the Github Giswater_db_model Wiki, where this and many other tables of the database are defined and explained. In addition, you can also find a lot of to get started with the project.
This is a database-centric project. The database acts as more than just a database. You are working on a new approach that unites data, user actions, and advanced algorithms.
As a result, you can find the relationships that act as a standard DB approach, the tables within 'inner logics' that work in an advanced database approach, and many stored procedures that act as 'inner algorithm' on the page Dbmodel: filling tables and strategies
Rendering
1) Only what is seen is rendered:
It is necessary to study the performance and take a decision (activate).
It is especially important to gain the speed of the project.
>5000 only arcs
<5000 tanks
<2000 everything
<1500 connecs
<1000 links
<500 virtuals
2) Properly configure QGIS
Open: Settings > Options > Rendering. The configuration that is displayed in the following image would be a correct example for layer rendering.
Each layer should also be controlled: Layer properties > Style > Layer rendering
Usually, the elements of the water supply and sanitation networks are going to be represented in asymmetric ways, making the rotation of the element particularly important to visualize it in the desired way. This often leads the user to wonder how can I give a specific rotation to the element?
With the correct configuration, we are ready to use the QGIS tool that will allow to rotate the node type elements.
The tool will only be activated if the layer is in edition mode. After clicking on the button, we must select the option Rotate Point Symbols and click on a specific item. Holding down the left mouse button, the element can be rotated, helped by a perpendicular line. When we see that the element is in the desired rotation, we must save it and close the edition to finish the modification. We will see the result visually, but internally what the tool has done is modify the value of the rotation field for the specific element in our database.
Giswater offers to its users different templates to generate plans and maps of some part of the project. As already mentioned in previous sections, some tools directly incorporate the generation of plans using the composer templates. As example, the tools of the longitudinal profile, the cutting polygon or the planning sectors generate plans directly.
The Giswater plugin folder has a subfolder named templates that contains several qpt files, QGIS templates, that the user can call from the composer manager and add them to the project. Initially, in this folder there are templates to make plans of the longitudinal profile, cutting polygon and the planning sectors for both A3 and A4 format.
However, each user can generate their own templates for the composer, so that any generated plan can have the desired appearance. For less experienced users, a good way to generate your own template is to copy some of the existing ones in Giswater and modify some of its parts.
This chapter tries to answer some of the more advanced or complex questions about the use of planning sectors (hereinafter psectors or alternatives).
Before reading this section, it is important to have the knowledge that is transmitted in the sections and , where the operation of the psectors is introduced.
It is also important to know the topological rules of the planified elements, explained in the section , especially the topology of states and the behavior of the links in planning.
It is important to highlight some features, describe processes that have not yet been mentioned or exemplify use cases.
The complexity of the psector begins in the Relations tab, where the elements that will be part of this alternative are established, either to introduce a new network layout or to remove part of it.
Features for each type of element:
Related arcs can be entered in the following ways:
Add a new section in the Planned state using the usual drawing tools. It will be able to use nodes in service or planified to connect. State=1, Doable=True (blue color in Image 101).
Select an existing section using the Select elements button (1st icon in green in Image 101) within the Relations tab (Arc subtab). This will disappear from the map when the alternative is active. State=0, Doable=False (orange color in Image 101).
Use the button to Replace arc in service with planned (3rd icon in green in Image 101) when the only thing we want is to change the catalog (material and diameter) of an existing arc but keep exactly the same layout. Two records will enter the Relationships tab: State=1, Doable=True (for the new one) and State=0, Doable=False (for the old one).
Split an In-Service arc with a Planned node. This triggers an automatic process where two new sections are generated and the one that was in service is 'unsubscribed'. We will call the new sections 'fictitious' or 'to maintain', since they maintain the previous catalog and layout and are only necessary to maintain the topology. State=1, Doable=False (for the new ones) and State=0, Doable=False (for the old one) (red color in Image 101).
Put a Planified node on top of an In Service node. It also triggers an automatic process and 'fictious' sections are generated for all those that intersect with this substituted node. The sections that were in service are 'withdrawn'. It is used to maintain the topology. State=1, Doable=False (for the new ones) and State=0, Doable=False (for the old ones) (purple color in Image 101).
The sections that appear in the Relations tab from an automatic process can be easily identified through the addparam column, which informs if it is an arc division ('parents' or 'children') or replacement process node ('generated' or 'decommissioned').
Ficticius arcs These are generated automatically through the explained processes of section division or node replacement. These can be identified since it is established a state_type different than usual for planified elements. In the Giswater sample schema this is FICTICIUS, but these can be configured and change its name or add a new one by:
Modify the value_state_type table, changing names or adding records with state=2.
In the config_param_system table, modify the value of the variable plan_statetype_vdefault in the key plan_statetype_ficticius.
Although they are generated automatically, once generated they can be modified again to adapt their use to what we really want to do in the psector. Examples:
If we want to make a substitution of only a part of the section, we must cut it with a node at the point where we want to end the substitution. Of the two fictitious sections generated, we can change the catalog and the state_type for one of them so that it is identified that it is no longer fictitious (so it can be symbolized in a different way). If we want it to enter the budget of the psector, we must change the doable field to True.
If we want to cut an existing section by the half and remove the other part, we will have to do the same as before but this time we will simply delete one of these fictious sections. We can remove it with the plugin tool or with the one of QGIS.
Related nodes can be introduced in the following ways:
Add a new node in Planned state using the usual drawing tools. This can only act as the initial or final node for sections in a planned state. State=1, Doable=True (blue color in Image 102).
Select an existing node using the Select Elements button (1st icon in green in Image 101) within the Relations tab (Node subtab). This will disappear from the map when the alternative is active. State=0, Doable=False (red color in Image 102).
Use the Merge with planned sections button (4th icon in green in Image 102) when we want to make a node in service disappear and join the two sections that connect to it into one. Enter a record in the Relations tab: State=0, Doable=False (orange color in Image 102) and 3 records also appear in the Arc tab: State=1, Doable=True (for the new one) and State=0, Doable=False (for the old).
Related connecs or gullys (hereafter connections) can be introduced in various ways. In this case, special emphasis must also be placed on the management that can be done of the links that unite the connections with the network. It can be managed in the following ways:
Select an existing connection using the Select elements button (1st icon in green in Image 103) within the Relations tab. In this case, it will initially enter the relationships as State=1, Doable=False (red color in Image 103). Next, the link can be modified by changing the arc_id (5th icon in green in Image 103). If you want to remove it from this alternative, you must change State=0 (orange color in Image 103).
As mentioned in the previous sections, the most important fields in the relationship tables with psector are State and Doable. These can be modified depending on the needs of the user. For example, in the case of connections, it may be common to have to go from State=1 to State=0 when you want to drop an existing connection.
In the Relations tab of the form there is a specific button (Image 104) to be able to make changes in these columns in an easy and multiple way.
On the elements selected in the table, you can click the button and choose if you want to change the state or the doable. In either case, what the program will do is change the value from 1 to 0 or vice versa and from true to false or vice versa.
There are several ways to manage connections and their links when they are in a planified state.
For each connection with State=1 in the psector, a new link will be created in the database. There are two possible scenarios:
Connection in Plannified state - It will have 1 link in Plannified state.
Connection in In Service state - It will have 2 links, 1 in In Service state (which will be displayed without the psector), 1 in the Planified state (which will be displayed with the psector).
This second case serves to change the way of connection using the psector. To do it you have to:
Change the geometry of the link or its arc_id. It can be done in several ways:
Manually edit the link with the usual QGIS tools. In case the connection point is in a different section, the arc_id will be changed automatically.
Use the Set arc_id tool from the connections tab of the psector. On the selected rows you can establish which section you want to connect to. The connection point can be established as the closest place of the selected section (Set closest point) or the exact place where the section has been clicked (Set user click).
One of the fields to take into account of the psector is its Status, since depending on the value that is established, certain changes can be executed automatically.
When executing or canceling psectors, its related features will be moved to traceability tables where consulting data will be clear and easy. Psector manager will still keep the alphanumerical basic data and the poligonal geometry around the existing features, but there will be no relations with inventory features.
Traceability tables are:
audit_psector_arc_traceability
audit_psector_node_traceability
audit_psector_connec_traceability
audit_psector_gully_traceability
These tables will contain all the information stored on plan_psector_x_* tables plus the executed action (EXECUTE or CANCEL) plus all the information on inventroy table (arc, node, connec, gully).
There are 5 different psector states, with its related actions:
PLANNED - No action
ON GOING - No action
EXECUTED (Save Trace) - Related features will be inserted to traceability tables with Execute psector action.
EXECUTED (Set OPERATIVE and Save Trace) - The elements that were planified will become OPERATIVE state. The elements that were planned to be removed from the psector will become OBSOLETE state. In order to also mantain traceability, related features will be inserted to traceability tables with Execute psector action.
CANCELED (Save Trace) - Realted features will be inserted to traceability tables with Cancel psector action.
Traceability tables are ready to load onto QGIS project using Giswater's Load Layers button. By default, a useful symbology will be setted to establish a visual difference between planified features, obsolete features and affected features. Of course this simbology can be modified by user to set a more accurate style according to the needs.
The export-import process to a hydraulic model has changed compared to previous versions of Giswater, since now the plugin integrates all the functionality. Let us look at some added improvements:
The elements can be sent to a model according to their status (STATE) that can be on service, obsolete or plannified, with the only condition that they have hydraulic coherence. For example, if in a sector I only have one tank in service state, and I send only the planned elements to a hydraulic model, this will not be possible.
In case of WS projects it is possible to configure the roughness according to the age of the pipe. To do so, use the inp_cat_roughness table and assign the age to the element. If the construction date is not assigned to the element, it will be considered new for the purpose of capturing the roughness value.
Some new elements appear which we have named nodarcs. The nodarcs are those elements that in inventory management are flow regulating nodes, such as valves or pumps, but that in the hydraulic model must be arcs, since a flow regulator in a conceptual way is always an element 'arc' that regulates flow between two different nodes.
The basic concepts that govern the export of the network to the hydraulic model, as well as the export peculiarities of each of the elements of the network, and the range of options allowed by the tool, are described at GitWiki:
To perform the hydraulic model, it’s necessary to have complete and accurate data for each of the elements and parameters that you want to model, therefore, to understand everything required in each of the hydraulic model tables, we will have the EPANET manual, which specifies in a very exact and detailed way all those necessary concepts.
The work by sectors allows the user to filter and send to the hydraulic model only those elements that belong to a specific sector or send several sectors at the same time. As specified in section 4.2.1.2 of this manual, the field 'sector_id' stores the data of the hydraulic sector to which the element belongs, and subsequently through the table ‘selector_sector’ filters those elements that belong to the selected sectors.
It should be noted that the sectors selected for export to the hydraulic model must have hydraulic coherence, i.e., for WS there must be a water reserve, which supplies the system (RESERVOIR, TANK) and at least one point of consumption.
To select sectors to send to the hydraulic model, we use the basic 'Selector' tool.
In the case of WS networks, the demand scenarios appear. The demand scenarios allow the user to define different demand hypotheses on consumer items (JUNCTION).
In a normal case, the relation between point of consumption and value of demand is 1:1 and the main value of demand 'demand', together with consumption pattern 'pattern_id' are defined in table 'inp_junction', as shown in the following image.
Through the 'inp_demand' table, the user can apply an alternative demand to the main demand of the consumption node and in turn change the demand pattern. To do this, first the new scenario is created in the catalog table ‘cat_dscenario’ and then the node element is linked with the new demand and the scenario to which it belongs, as shown below.
Giswater solves this duality using the elements called 'nodarc', elements that by their characteristics in the inventory are nodes, but due to their behavior of flow regulator in the hydraulic model must be arcs. This 'nodarc' element is defined by the user’s demand in the system table (node_type).
All those elements that are labeled as SHORTPIPE / VALVE / PUMP, are 'nodarc' type elements, and therefore their model information is stored in the tables:
- inp_shortpipe - inp_valve - inp_pump
For a 'nodarc' element to be valid, it must comply with the rule of having 1 or 2 extreme arcs, otherwise the node will not be valid and will not become an arc.
The transformation process from NODE to ARC is the following:
A new ARC type geometry of 0.5 meters length or less is generated (suffix _n2a).
Two new JUNCTION nodes are generated (suffixes n2a1 'initial node' and n2a2 'final node').
The arc geometries of the existing arcs are 'clipped' and reconnected to the new nodes to accommodate the new arc.
The attributes of the JUNCTION elements are inherited from the parent node.
The attributes of the ARC elements are inherited from one of the two extreme arcs (material, diameter, etc.).
When representing a pumping within Giswater, it is possible that the relationship between the element and its behavior in the hydraulic model is not 1:1, i.e., (a pumping element is equivalent to a pump-type flow regulator), but rather contains more than one pump and therefore a 1:n relationship is generated with the element, (a pumping-type cadastre element is equivalent to several flow regulators).
Every flow regulator labeled as PUMP stores its information in the 'inp_pump' table, which must be completed with the parameters that regulate the operation of said pump, thus, by default the relationship that is generated between the node and the number of pumps is 1:1.
Through the ‘inp_pump_additional’ table, Giswater allows the user to manage more than one pump for a single pump-type element. This table must indicate the id of the parent node, the number of the pump defined in that node with respect to the total number of additional pumps and the working parameters of each of the additional pumps, as shown in the following example:
The example shows two additional pumps of the node '1105', i.e., this node, when exported to the hydraulic model, will be transformed into three pump-type arcs each with their own working parameters.
The relationship established between them is complex and is detailed in this table:
On the other hand, regarding the management of the status of the valves of a supply network is usually somewhat dynamic, depending on the user's needs, the status of the valves may be one or the other to perform the hydraulic simulation of the model. This modification of the status of the valves is due either to changes made in the inventory (broken valve, valve out of service, etc.) or to specific changes in their status when generating a cutting polygon.
Thus, it can be said that the valves may have different status depending on the table in which the data is stored: 'inp_shortpipe', 'man_valve' or 'anl_result_mincut_valve'.
Through the "Options" button within the export form to the hydraulic model, the user will be able to choose the status of the valves to be used in said simulation.
- EPA TABLE: Those whose status is ‘In service’ or ‘Planned’ in the ‘inp_shortpipe’ layer. - INVENTORY VALUES: Those whose status is ‘In service’ or ‘Planned’ in the ‘man_valve’ layer. - MINCUT RESULT: Those valves that, depending on the results generated by the cutting polygon, have been affected. In turn, the user will be able to choose through the "Mincut result id" drop-down, the results of the cutting polygon that he wishes to model.
To perform the hydraulic model, it is necessary to have complete and accurate data for each of the elements and parameters we wish to model; therefore, to understand everything required in each of the hydraulic model tables, the SWMM manual is available, which specifies in a very exact and detailed way all those necessary concepts.
The work by sectors allows the user to filter and send to the hydraulic model only those elements that belong to a specific sector or send several sectors at the same time. As specified in section 4.2.1.2 of this manual, the field 'sector_id' stores the data of the hydraulic sector to which the element belongs, and subsequently through the table 'selector_sector' it filters those elements belonging to the selected sectors.
It should be noted that the sector or sectors selected for export to the hydraulic model must have hydraulic coherence, i.e., for UD networks the minimum requirements would be an entry point of water into the system, either rain, through the application of a rain in the SUBCATCHMENTS or, through wastewater (DWF), and an exit point of the system (OUTFALL).
In case of UD networks, exists the hydrology scenarios. The hydrology scenarios allow the user to define different hypotheses about the method of infiltration, surface runoff, groundwater, de-icing, etc. applied to the drainage sub-basins (SUBCATCHMENTS).
Using the catalog 'cat_hydrology' it is possible to define a catalog element referring to the data of water flows that enter naturally into the system, indicating the identifier, a name, and the used infiltration method.
The infiltration methods recognizable by SWMM are: curve number, Green-Ampt or Horton equation.
Once the hydrology catalog has been defined, in the inp_subcatchment table each drainage sub-basin is related to the hydrology catalog to which it belongs, through the hydrology_id field.
This relationship allows us to apply different calculation hypotheses on the same drainage sub-basin, and with the hydrology selector select those that we wish to use for the simulation.
It is important to note that the fields filled in that refer to the infiltration method in the inp_subcatchment table must be recognizable by the hydrology catalog that is assigned to them.
Giswater integrates into its system the different varieties of geometric sections that SWMM supports to catalog the ducts of a UD network. Through the arcs catalog table, the different types of ducts are defined, filling in the following mandatory fields: id, matcat_id, shape and the geom* fields necessary to define the shape.
To know what data to put in these fields, you should consult the SWMM section catalog and know how this catalog and the domain table of normalized section values (cat_arc_shape) work in an integrated way.
In this sense, the cat_arc_shape table is composed of the following fields:
Id: name of the shape (in selected language) of our catalog (is the one that acts as domain values of the cat_arc_shape field).
Epa: name that receives the shape in SWMM (see section catalog of SWMM).
tsect_id: in case of open irregular shapes, label of the set of values in the inp_transects table that define the irregular geometry according to the HEC format.
curve_id: in case of shapes not included in the catalog of the attached document, the name of the curve defined in the inp_curve table defines the pairs of values that make up the detail of the shape of this section.
image: system field with the name of the png file that is stored in the Giswater plugin folder (plugins/giswater/png) and that is called when an info is done on an arc type element and the cost tab is clicked.
descript: auxiliary field of the description of the section.
active: boolean field that allows to control if the form is active in our catalog or has been unsubscribed and is not selectable.
Considering the previous information and consulting the SWMM section catalog, the geom* fields can be filled in depending on the chosen shape.
Here are two examples of the relationship between the cat_arc_shape table and the cat_arc arc catalog.
If you wanted to catalog circular ducts, for example, as ' Redondo ' this translates to:
For the cat_arc_shape table,
cat_arc_shape.id = 'Redondo'
cat_arc_shape.epa = 'CIRCULAR'
cat_arc_shape.image = 'ud_section_circular.png'
And in the cat_arc table,
cat_arc.shape = 'Redondo'
cat_arc.geom1 = The value expressed in meters of internal diameter of the element
If I wanted to catalog my closed rectangular ducts, for example, as 'Rectangular' this translates to:
For the cat_arc_shape table,
cat_arc_shape.id = 'Rectangular'
cat_arc_shape.epa = 'RECT_CLOSED'
cat_arc_shape.image = 'ud_section_rect_closed.png'
And in the cat_arc table,
cat_arc.shape = 'Rectangular'
cat_arc.geom1 = The value expressed in meters of the interior vertical dimension of the element
cat_arc.geom2 = The value expressed in meters of the interior horizontal dimension of the element
In reality, the table cat_arc_shape is already filled in with all the standardized forms of SWMM, so expanding this catalog according to our needs is quite easy to understand and proceed.
THREE BASIC RULES are always fulfilled:
1) The value of cat_arc_shape.id can be customized by the user, but the value of cat_arc_shape.epa must always be normalized to one of the values of the SWMM section catalog.
2) All the measurements (cat_arc.geom*) are interior and should be expressed in meters.
3) The values of cat_arc.geom1 always correspond to the vertical dimension of the element, as well as the values of cat_arc.geom2 always correspond to the horizontal dimension of the element.
For the other cases, consult the SWMM section catalog.
For the management of the different flow regulators, the version 3.0 of Giswater maintains the same logic as the previous versions where the virtual arcs can be assigned to an EPA element.
In this sense, there are two types of virtual arcs, those that enter the node (which would be the extension of the driving that precedes it) and those that leave the node (which would be the flow regulator).
In the first case, the virtual arc is simply a flow propagator, which apart from the characteristics of the element, must indicate the direction it drains (the node 2). Therefore, when carrying out the export to the hydraulic model, what Giswater does is joining this virtual arc with its predecessor, converting the two into one.
At the same time, if the add_length field we have it as true, the length of the virtual arc will be added at the time of merging, but if we have it in false, the length of that element will not be added.
In a practical case, the virtual arcs which are flow propagators, would be applied to nodes of big dimensions like deposits or cameras, whose arcs arrive to them but do not connect with the center but remain at its perimeter, and the connection section between these two points would be a virtual_arc.
In the second case, the virtual arc behaves as a flow regulator. The flow regulators are structures or devices used to control and derive the flows within the transportation system. The flow control elements that SWMM can model are the ones listed below, and its information is stored in the following tables:
Orifice, table: inp_flwreg_orifice
Weirs, table: inp_flwreg_weir
Outlets, table: inp_flwreg_outlet
Pump, table: inp_flwreg_pump
In the tables named above, when introducing a new flow regulator, the following parameters must be defined: source node, destination arc, regulation ordinal (in case we want to introduce more than one regulator between that node and that arc with that type of regulation), and finally the different parameters that control said regulator.
In the case if there is a virtual arc just after the node, the exit_conduit field should not be the arc_id of the virtual arc but should be the arc_id of the conduit that receives the flow since the merge operation of the virtual arcs with the conduit this is coupled with the arc_id of the conduit.
If more than one regulator coexists between a given node and arc, at the time of export, the system draws as many arcs for SWMM as there are regulators.
Important aspects to consider with the flw_length parameter:
The parameter flw_length is the length of the flow regulator.
If there is more than one flow regulator between the node and arc, the system will take the maximum value.
The length of the flow regulator is important in case of orifices or weirs and refers to the distance downstream of it, in which normal flow conditions in the pipeline can not be assumed, i.e., this is an ineffective length of the downstream conduit.
Until version 3.5.025, for "ud" projects, when we wanted to export our network we had to go to "Go to EPA" and click on "Options" to configure a series of parameters (both in the "Inp" and in the "Rpt" tab) that were necessary for the simulation.
Since version 3.5.026, in the "Inp" tab, in the "GENERAL" section, we find the "Network geometry generator" parameter, which will allow us to configure the export to perform the simulation with SWMM (option "1D SWMM") or with IBER (option "1D/2D SWMM-IBER").
This opens up a wide range of possibilities when studying our network, since it allows us to also simulate it with IBER and study its behaviour in the different scenarios that can occur in floods.
When we choose the option "1D SWMM" an inp file will be generated, as before, containing all the information that SWMM needs to ru the simulation. In the event that we choose the "1D/2D SWMM-IBER" option, two files will be generated that can be loaded into IBER:
One with the .inp extension that will only use the hydraulic data (data referring to rainfall or hydrology will not be used since they must be created specifically in IBER).
Ahother with a .dat extension that will contain the information on the drains that will be managed from IBER.
As we can see in the previous image, in the new .dat file we have some fields from the sink layer that did not exist until now.
Next, we will see what they are.
As of version 3.5.026, if we display the "EPA" group in the ToC, within the "Hydraulics" subgroup we can see that we have three new layers:
Inp Netgully: represents those gullys that function as a node.
Inp Gully: are the gullys of the network.
Gully2Node: line that joins the drain to the node.
Since the layer we are interested in is the "Inp Gully", we are going to focus on it. If we open its attribute table and scroll to the end, we will see that there are some fields that we must fill in:
outlet type: outlet type. We may have two options:
To_network: towards the network.
Sink: the flow will be lost as sink behaviour.
custom top elev: custom elevation. This value overrides the value of the top_elev field.
custom width: custom width. This value overrides the width that the inlet is assigned in its corresponding catalog.
custom length: custom length. This value overrides the length that the gully is assigned in its corresponding catalog.
custom depth: custom depth. This value overrides the depth that is defined in the node or gully depth.
method: calculation method used for gullys in IBER. There are two options:
W/O: this method uses the values of the "weir_cd" and "orifice_cd" fields.
weir_cd: discharge coefficient of the weir used in the W/O method.
orifice_cd: discharge coefficient of the orifice used in the W/O method.
custom_a_param: custom value for the A parameter when using the UPC method. This value overrides the parameter value in the corresponding catalog.
custom_b_param: custom value for the B parameter when using the UPC method. This value overrides the parameter value in the corresponding catalog.
efficiency: efficiency of the sump in controlling runoff.
We can configure the values of the "outlet type", "method", "weir_cd", "orifice_cd" and "efficiency" fields by default by going to the "Basic" tab in the Giswater configuration.
When we have filled in all the corresponding values, we can now export our network. As soon as we have exported it, we will have to be aware of possible critical errors that may occur. In the event that any appear, we must correct them.
The following scheme shows the hierarchy of existing catalogs within Giswater:
Raingage: represents rain gauges as point elements
Now the state of the cutting polygon will be planned, but, as we will see, the state is automatically modified depending on the process. At this moment it is time to click the button that will allow to choose the point of the network where the water will be cut.
At this moment, the second button of the mincut toolbar is activated, which will allow, optionally, to choose a valve that for whatever reason will not be able to be closed. By clicking on the button, we choose the valve, and the results of the process will be recalculated considering the modification.
The tool offers different symbologies depending on the zoom of the project. In some cases, the dimension data is shown within a circle. With the button, you can enter the coordinates where we want to place this circle.
The Giswater plugin does not incorporate a specific tool for the rotation of elements, but there is a QGIS tool that will allow to establish it very easily. This tool requires that the layer that we want to rotate has assigned a field as variable of rotation. In Giswater projects, all elements of the network have available a field called 'rotation' that pursues this goal. To use the rotation of QGIS, it must be configured as a rotation management variable, as shown in image below.
As seen in section , when locating Planned nodes on sections, various processes of section division will take place with the commented results.
Add a new connection in Plannified state using the usual drawing tools. State=1, Doable=True (blue color in Image 103). It can be connected to the network through a link in the ways described in the section .
With the substitution of any section that has connections using the methods described in sections and . All the affected connections will enter relations with State=1, Doable=False. It can be modified later if you want to unsubscribe or change the link.
Add the desired connections to the psector Relations using the methods explained in .
NOTE: IBER is a two-dimensional hydraulic model software used for simulation of free overland flow. For more information, you can visit their website: .
UPC: this method uses the values of the "a_param" and "b_param" fields. For more information about this method, you can visit .
mincut_state
0
Planified
mincut_state
1
In Progress
mincut_state
2
Finished
mincut_state
3
Canceled
mincut_state
4
On planning