state topocontrol - Giswater/giswater_dbmodel GitHub Wiki

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.

Arc-node topology

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. First let's 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 the 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 connection 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.

State topocontrol

In order to talk about state topocontrol we must also consider some of the conditions in relation to the states of the elements. In the following table all types of modifications (insert or update) between arc and node elements are presented. It is worth reminding, that the available states are: 0 = Obsolete 1 = Operative 2 = Planified

Control triggers

The entire topology and state relation is being controled in real time, while data is being inserted updated or deleted, by two triggers, called gw_trg_topocontrol_node and gw_trg_topocontrol_arc. Those triggers check the network using some of the parameters set for the system in config_param_system:

  • edit_state_topocontrol
  • edit_topocontrol_disable_error
  • edit_arc_samenode_control
  • edit_arc_searchnodes
  • edit_node_proximity

And some of the parameters set for the user in config_param_user:

  • edit_disable_statetopocontrol
  • edit_arc_insert_automatic_endpoint
  • plan_psector_vdefault