Skip to content

state topocontrol

Edgar Fuste edited this page Nov 2, 2021 · 1 revision

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

The state type that has the most restrictive conditions is the planned one. 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 Operative 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.

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
Clone this wiki locally