3.6.001

INDEX

INVENTORY

Info is now fully configurable via database (widgets from all tabs, actions, tableviews, etc.)

Many features shown by the info button were customizable so far, but not all of them. Now, the data shown by the Info Button can be fully configurable via database. The user can add, remove, hide or show the features that the Info Button shows, as well as modifying the upper actions toolbar. The tables from the database that enable this customization are the following:

  • config_form_fields: this table enables the user to show specifically which fields of a specific table are shown in each tab. Many features of this table were already available on previous versions of Giswater.

  • config_form_list: this table enables the user to display specific data of a table by writing a SQL query. On column listname, the user must specify the name of the table from which data is going to be extracted. It is mandatory to use an existing table on the database. In column query_text, the user may write the SQL statement needed to extract the data of choice from the table specified in column listname. Additionally, there is a column called listtype which only accepts 2 types of names: "tab" or "attributeTable" according to the way the table is displayed.

  • config_form_tableview: this table enables the user to set properties to specific tables. These can be their visibility, width, alias and style of its fields. There are 2 primary keys on columns objectname (name of the table) and columname (name of the column), whose values are mandatory before any insert of a record on that table. As for the style, it is not possible to add any different style but the following json string: {"stretch":true}.

  • config_form_tabs: this table enables the configuration for each tab into the Info layout, as well as its upper toolbar. The user can configure which table's information wants to see by editing column formname and which tab is going to show that information by editing column tabname. Additionally, there is a column called tabactions which uses a json string to enable or disable the button actions on the upper toolbar of the Info layout. There is also a column called sys_role to specify which roles are available to see each tab and button from the upper toolbar. To make it more customizable, there are 2 columns (label and tooltip) to set the visible name of the tab and its tooltip when the user interacts with it.

A new check is done when inserting links. This check occurs when the user tries to insert a link and it consists of checking if the new inserted link is connected to an arc with smaller diameter than the connected link. The user can configure whether or not to check this issue via table config_param_system with the parameter edit_link_check_arcdnom. The values for this parameter are stored in a json string, which contains 2 variables: status (true or false if activated or not respectively) and diameter of the link with which the arc diameter is going to be compared. Once activated, the issue will be checked every time the user inserts a new link.

A new check is done along the Check Project process. While the previous process checked if the inserted link had a smaller diameter than the arc to which was connected, this process checks if a link with a diameter of choice is bigger than the arc diameter to which is connected. This issue is checked every time the check process is executed and the results figure out in the output of the Check Project as WARNING-488.

A new check is done along the Check Project process. This consists of checking if connecs (and also gullies for UD) have more than 1 associated link on service. This issue figures out in the output of the Check Project as WARNING-480. This is not configurable via database unlike the previous cases.

Add region and province tables and add region_id and province_id fields to municipality and inventory tables

2 new tables have been created: ext_province and ext_region. The second one, has a field named province_id which acts as foreign key of table ext_province. Additionally, the fields province_id and region_id have been added to the table ext_municipality and inventory tables (v_edit_tables) where both fields are foreign keys from their respective tables.

Regarding to the inventory tables, these 2 new fields figure out as the name of the province and the region, unlike the table ext_municipality where these 2 fields are the id of the region and province respectively.

Add new fields on inventory tables for UD

The new fields have been added to the next tables:

  • For tables node, arc, connec, gully, new fields have been added under the name of adate and adescript. These fields can be filled with additional date and additional description respectively.

  • Also for table gully, 2 new fields have been added: siphon_type and odorflap. The field siphon_type can be filled with the type of siphon and the field odourflap can filled with TRUE of FALSE if there is a preventive method for odour presence for a specific gully.

  • For tables man_manhole, man_conduit and man_chamber, the new field is called bottom_mat. The field is optional to fill and it can be used for giving information about the bottom material of the element.

  • Also for table man_chamber, a new field has been added: slope. It gives information about the slope in percentage. It is calculated with the difference between the entry level and the exit level and divided by the length.

  • For table cat_arc, the new field is called visitability which shows if the element can be accessible for a person to inspect it in situ.

New functionality: get address and postnumber automatically when inserting node and connec

This functionality works automatically when inserting nodes or connecs. Therefore, it requires the table ext_address to be filled with data. This feature can be configured via basic config of Giswater or via config_param_system with the parameter edit_auto_streetvalues. Its configuration is stored in a json string with 3 variables inside: status (true or false if the functionality is activated or not respectively), field ("postnumber" or "postcomplement" if the gate number is stored in one field or the other from the v_edit_tables) and buffer (the distance buffer where the function looks for the closest gate number for that node or connec).

As for the field where the gate number is stored, the user may consider using the postnumber when the gate number is strictly an integer. However, the field postcomplement allows the user to store the gate number as a text string, which is useful in those cases when the gate number contains letters or symbols.

Add last update and lastupdate_user to v_edit_tables

2 new fields have been added to v_edit_tables. These are lastupdate and lastupdate_user and they give information about the last time stamp where the table has been updated and the user who updated the table respectively. The lastupdate_user is the user that has logged in the database connection when the credentials to connect to it have been asked to the user.

Add staticpressure update on trg_edit_connec (harmonize with node)

The field staticpressure from table v_edit_connec is being updated like it happens in table v_edit_node. It is mandatory to create presszones in order to compare the heading pressure with each node's pressure.

OM

New function: gw_fct_mincut_show_current to show mincuts that are currently being executed in a field

This function shows the mincuts that are being executed in the selected exploitation. It can be found in Giswater Toolbox by the name of Show current mincuts.

EPA

Full refactor of inp database objects

Several improvements related to EPA have been done in this release. These are going to be explained in detail throughout this section and these are listed below:

  • Some inp tables (most of them, tables related to quality) have been merged into features from other inp tables.

  • New button to switch to EPA point of view in order to see the network as it would be exported to EPA.

  • New tab EPA in Info Layout with a dscenario manager for EPA objects and also a set of actions to manage flow regulators and demands for EPA objects.

New button: Toggle EPA World. Toggle an "EPA Point of View" to show the network as it would be exported to EPA software

A new button has been added for both WS and UD under the name of EPA World, which is located next to the 'Load Giswater Layer' button in the QGIS Layers Panel.

By clicking on it, a warning message is shown and the visible network elements are filtered in order to show the network as it would be exported to EPA Software. Therefore, the elements with an epa_type of 'UNDEFINED' are not shown because they are not going to be exported, as well as Giswater own elements like Connecs or Links.

This may help the user to visually check the network in an easy-quick way before exporting it to EPA Software.

Added tab EPA in info

A new tab called EPA has been added to the elements form. The tab EPA shows most of the properties that EPA Software would show for each element. The data shown in this tab is stored in the table view for each EPA element, whose prefix is ve_epa_ (i. e. ve_epa_pump, ve_epa_shortpipe, ...). Having this, there is no need to load on QGIS canvas any layer from EPA World to see its features. Additionally, there are 2 sections inside tab EPA: Data and Dscenario

In section 'Data', the user can see all the element's feature regarding to EPA. The user can customize the different features appearing in this section in table config_form_fields filtering by columns formname (name of the table view) and tabname (tab_epa). To add a new feature to be shown in tab EPA, the user must add a new row into table config_form_fields and specify the data in columns formname (name of the element table view), form_type (form_feature), tabname (tab_epa), columnname (name of the column of the specified table view the user wants to be shown) and label (a descriptive text placed next to the values shown in the form element). In addition, user can hide the features of tab EPA also in table config_form_fields by setting to TRUE the column hidden.

Additionally, tab EPA has another section called 'Dscenarios'. This is a demand scenario manager where the user can manage several scenarios for that element without needing to use the Dscenario Manager Button. This enhancement makes it easier for the user to manage scenarios for a specific element.

Create new object ws-virtualpump and remove import inppump and import inpvalves

A new epa type object has been defined in table sys_feature_epa_type from WS. This is called VIRTUALPUMP and it acts as an arc. When inserting any arc, the user can specify its epa_type as virtualpump.

Regarding to the Import CSV button, the options 'Import Inp Pump' and 'Import Inp Valves' have been removed from the data-selection widget.

New function 'Set optimum outlet' and refactor of subcatchment views for ud projects

A new function has been developed for UD which sets the optimum outlet node for each subcatchment. The function parameters can be set in table config_param_user where the parameter is called inp_options_hydrology_scenario. In column 'value', the id of the hydrology scenario has to be specified, which must be previously defined into table v_edit_cat_hydrology. Therefore, the function will be executed for one hydrology scenario each time.

The function works for nodes whose epa_type is junction and it updates the field outlet_id from table inp_subcatchment with the node_id acting as an outlet. The function takes into account the minimum elevation of the subcatchment and the elevation of the nodes. Therefore, the column minelev from table inp_subcatchment and field elev from table view v_edit_node must be filled with data to be able to run the function.

Refactor of subcatchment views for UD projects

Table views related to subcatchments have been modified by reordering its fields and adding new ones. These table views are essentially v_edit_inp_subcatchment, vi_subcatcentroid and vi_subcatchment.

Add new actions in info to manage flow regulators & demands for EPA objects

This is a set of actions that can be found in Info Layout inside EPA tab. These actions enable the user to manage flow regulators (orifices, outlets, additional pumps and weirs) and demands for any element. When inserting any flow regulator, it is mandatory to fill the following fields: order_id, to_arc and flwreg_length.

MASTER

Do not allow to insert features with different expl_id than the psector

This prevents the user to insert features from different explotations into a psector that belongs to a specific exploitation.

ADMIN/SYSTEM

Drop obsolete table 'selector plan_psector'

The table selector_plan_psector has been removed from the database, as it is deprecated.

Make multi-transactional some stored procedures

Some of the transactions used one table to store the output information while executing the process. This fact prevented other users to execute some process at the same time, as the table could only be used by one process at each time. To solve this, these kind of tables have become temporal tables. This resulted in a better performance of some relevant procedures in terms of time execution and database usage. The procedures that have been enhanced by far are the following:

  • Flowtrace and flowexit (UD)

  • Graphanalytics minsector (WS)

  • Graphanalytics mapzones (WS and UD)

  • Mincut (WS)

Last updated