[postgis-users] Help with Topology Triggers sought

Sandro Santilli strk at kbt.io
Mon Jul 11 00:01:20 PDT 2022


On Fri, Jul 08, 2022 at 02:50:13PM +1000, Simon Greener wrote:

> QUESTION: If the new linestring that is added to the existing topology
> causes an existing underlying edge to change (eg split),
> what happens to any other topogeom objects in the table that reference the
> edge before it is changed?

The TopoGeometry objects composition is updated to reflect the changes
in the underlying (primitives) structure so to keep their original
aspect (point set) as much as possible (adding a vertex to a line ALWAYS
results in a slight movement of the line, being our representation space
not infinite).

> Should the affected topogeoms be found and updated to reflect any splits to
> edges?

It's already done by the topology editing function, but not by
integrity constraints, so as long as you're adding your linestring
with provided function there should be nothing else to do.

Specifically such updating will surely happen with:

  toTopoGeom
  TopoGeo_addPoint
  TopoGeo_addLinestring
  TopoGeo_addPolygon


--strk;


More information about the postgis-users mailing list