[postgis-devel] triggers for postgis topology edition

Sandro Santilli strk at keybit.net
Thu Feb 5 04:09:47 PST 2015


On Thu, Feb 05, 2015 at 01:00:19PM +0100, RĂ©mi Cura wrote:
> Yep,
> enabling/disabling seems necessary because as you said,
> and is very easy to do (ALTER TABLE table DISABLE TRIGGER USER;)
> enabling the trigger and importing data in topology would be at best slower,
> , probably very hard to write
> , and at worst impossible (infinite trigger call).
> 
> I also have the concurrent editing in mind, but I don't aim at doing an
> un-breakable topology for my first try.
> simply allowing reasonable edition in qgis, where the user understand
> topology and doesn't break things:

One idea, had you tried QGIS own topology editing mode ?
That is, it can make it so that when you move a vertex in one layer
it moves the equivalent vertices in all other layers.
I think I automatically enabled that for topology primitive layers
at one point but later reverted it because it was done the wrong way.
See
https://github.com/qgis/QGIS/commit/314c783b211fb75c2056cb272047739b1874eeaf


>  - edition not modifying topology : moving non-isolated node, changing geom
> of edges (excluding first/last point, no crossing other edges)
>  - edition modifying topology : create a node (split edge if necessary),
> delete a node(heal edge if necessary), adding/deleting edged between
> existing node

Did you see my plugin as an alternative approach ?
https://plugins.qgis.org/plugins/pgtopoeditor/

--strk;



More information about the postgis-devel mailing list