QWAT
QWAT copied to clipboard
Document why and how the pipe geometry_alt1 geometry_alt2 exist/work
In Romania we're not using the pipe geometry_alt1
and geometry_alt2
pipe columns.
I've searched the baseline project and there's no layer based on those geometries.
How are you guys using this?
I think this plus some other things that are not clear need documenting so I would also like to start documenting them. I think it's not a problem if we mix English with French in the user manual, right?
- when
update_geometry_alt1(2)
areNULL
OR 't', thegeometry_alt1(2)
are mirroring thegeometry
column.
From what I see, geometry_alt_2 is used in vw_pipe_schema_visibleitems in layer "conduites edition 5000" . Denis told me that the geometry_alt_1 is currently not used but was asked by Morge.
When starting an edit session of pipes, a dialog asks if alternative geometries should be updated or left as before. This is how it works currently. As long as geometry_alt_1 is not used in demo project, we should hide it in the dialog, and add some tooltips and notes in it to explain what's the use of it from a user point of view.
@haubourg I'm looking at the trunk project and I see the geometry column is used there.
When starting an edit session of pipes, a dialog asks if alternative geometries should be updated or left as before. This behavior is not in the trunk, right?
Look inside the view definition, it's renamed from geom_alt to geometry :)
Indeed! It's not at all intuitive :). The more the reason to document this.
I'll try to explain briefly.
Alternate geometries exist to provide a solution to display elements in a readable way at different scales by avoiding overlaps. By default alternate geometries are the same as the main geometry and remain as long as it is untouched. When modified (in a dedicated layer), alternate geometry differs from the main one. From this point, if the main geometry changes, the user will be asked if he want the alternate geometry to remains as it was before or to be updated as the new main geometry. If it becomes equal to the main geometry, same scenario as before: nothing asked on a main geometry change.
This is achieved by a little hack:
- a macro in the project detects geometry changes: it tests if the alternate geometry differs and if so, it asks the user.
- The answer of the user is stored in a field on the table (update_alternative_geometry)
- A trigger on the DB looks at this field and update accordingly the alternative_geometry.
I think it would be nice to bring this explanation in the doc, with some review prior to this.