qwat / qwat-data-model

TEKSI Water module (project QWAT) - PostgreSQL / postgis Datamodel
https://www.teksi.ch
23 stars 25 forks source link

Each node that's on a pipe should have an underlying vertex #176

Open tudorbarascu opened 7 years ago

tudorbarascu commented 7 years ago

Currently, if an editor moves a pipe vertex, and there's a water lateral between the vertex and the next vertex on that pipe the topology between that object and the pipe is broken.

This does not occur for valves as they always create vertex on the underlying pipe.

This can be mitigated by teaching editors to always create a vertex on the pipe where they add a water object and to only enable snapping on vertexes.

However, it would be far better to also enforce this in the data model by ensuring a pipe vertex gets created under each node/point water object that's on the pipe.

haubourg commented 7 years ago

OK, I get it, this allows the topology editing feature of QGIS to move pipes together. Another option would be to ensure that in the DB API within a snapping tolerance.

tudorbarascu commented 7 years ago

Here's a snapshot of the bad result from production: problem

When the "dessinateur" moved a vertex from that main pipe he didn't know he would actually break topology to water laterals. This is because in this case the pipe is long and doesn't fit in the whole map canvas at editing scales (around 1:200).

To be more explicit I made a screen-cast. You can see that I edit 2 water laterals but create a vertex only for the left one, and this breaks topology for the right one when I edit the pipe furthermore: peek 2017-06-08 07-58

Had I been too zoomed in I wouldn't have seen the problem. A mitigation procedure is to always create vertex (and enforce usage of vertex snapping only).