Functional mapzones default values - Giswater/giswater_dbmodel GitHub Wiki


Goals:

Know the different ways of setting a default value when establishing a mapzone to a network element, whether it is a new element or whether it already exists.


Description:

In Giswater there are different areas of the map (mapzones) that are very important layers that group the elements basing on their location and/or characteristics. Apart from knowing what each one is for, it is important to know how their values are filled in, many times filled in automatically to avoid possible errors in the data.

There is a hierarchy that is followed when filling in these values, which will be used if the requirements are met. If not, values will complete using the following rule:

  1. RELATION TO OTHER ELEMENTS (only for arc, connec and gully) – For these element types, the values that already have their relations will always prevail as values of the mapzones:
  • arc: value of its node_1 and node_2. In case these are not equal (border zones between mapzones) it will only be applied in case a node has _mapzone_= 0(undefined). Then the non-0 will be used.
  • connec/gully: value of its related arc_id (if its filled in).
  1. DEFAULT VALUE – If there is a default value for a mapzone in the configuration (per user), it will be used for the newly inserted elements. Usually these defaults are disabled and are notdisplayed in the plugin's 'Config' tool, but they can be enabled by changing the value of isenabled to TRUE in audit_cat_param_user for:
  • dma_vdefault
  • sector_vdefault
  • presszone_vdefault

In case it is not inside any or more than one mapzone (since these can overlap in some spaces), the section closest to the point where the element is being inserted will be searched and its mapzone will be used. The maximum distance that can be reached to find a related arc is defined by the proximity_buffer variable in the config_param_system table.

WARNING: dqa_vdefault is not yet developed. Maybe later...