Open urskaufmann opened 5 months ago
Same behaviour for nodes and covers should be possible, I did not find where lies the difference between these two behaviours.
What is actually possible :
From vw_tww_wastewater_structure
:
From wastewater_strucure
(geographical selection is not possible if the detailled geometry has not been set)
Remark : This complexity comes from the fact that we can change main cover and main node attributes directly from the vw_tww_wastewater_structure, therefore changing its related fk_main_cover and fk_main_node would result in conflict with attributes (when changing main node, the node would inherit of some of the previous main node)
Same behaviour for QGEP
Is there a possibilty with QGIS-functionality to select one of the already existing nodes, that are already connected to the wastewater_structure, as the new main_node? Or other possibilty: if we import INTERLIS data, then the main_node is selected automaticaly. If there is a wastewater_structure without main_node, it's the same situation. So: if there is empty fk_main_node field, there should also automaticaly the next node be selected.
A graphical way to do it in QGIS (in wastewater_structures)
Extra : If we want the selection to be limited to the wastewater nodes referencing the wastewater structure, we could set a filter to propose only these entities but I would test that in the expression workshop of next QGIS user day (I do not know the syntax yet).
The simpler the better : If the logic exists for covers, make the definition of the fk_main_ws_node simply the next referencing ws_node.
If we want the selection to be limited to the wastewater nodes referencing the wastewater structure I think this is a must else we have a chaos
To think about (I have no preference yet): my question is also if a graphical selection is helpful or if a list to choose from (that offers only the connected nodes resp. covers) would'nt be the easier interface?
To think about (I have no preference yet): my question is also if a graphical selection is helpful or if a list to choose from (that offers only the connected nodes resp. covers) would'nt be the easier interface?
Even with a tabular selection, the user is still able to see where the entity lies on the map through redlining.
We use sql functions on the db side after interlis imports, see #97. They are however not called by triggers. Also I am not fully sure about the behaviour for structures with more than 2 nodes.
Find why cover and node main attribution differs in behaviour.
There is a trigger for the cover table which calls wastewater_structure_update_fk_main_cover
(see tww_app.on_cover_change
). There is no equivalence for nodes.
I just tried what happens, if
There should be a ui to choose/define a main_node and when deleting the main_node, the user should get at least a warning.