[postgis-users] topology cleaning up

Sandro Santilli strk at kbt.io
Wed Jan 9 08:37:48 PST 2019

On Wed, Jan 09, 2019 at 07:59:45AM -0700, Bo Guo wrote:
> Hi there,
> My street table has road segment geometries from several jurisdictions.  The
> business rule requires me to build topology not for the entire table, but on
> a jurisdiction-by-jurisdiction basis.  I will need to re-generate the
> topology when geometry updates happen.
> I can rebuild new topology, but that leaves old topology in the topo tables.
> So I want to remove the old topology before building new topology using
> topology.totopogeom for a jurisdiction. However, the constraints in and
> among the topology tables prevented me from the delete operation.

How about using DropTopology to start with a fresh one ?

> Since the topology is only managed by the postgis' topology engine, can I
> just remove some of the constraints?  This will not only allow deletion and
> but improve some operations as well?

Removing constraints would likely improve some operations, but I'm not
clear which constraints are preventing you from creating a whole new
topology as your business rule seems to require.


More information about the postgis-users mailing list