[postgis-users] Topology: cannot delete slivers (or gaps)

Sandro Santilli strk at keybit.net
Fri Oct 31 09:39:17 PDT 2014


On Fri, Oct 31, 2014 at 10:17:48AM -0400, Guillaume Drolet wrote:

> I created a topology for 2290 polygons and populated a topogeom column

[...]

> I need to fix 1) extra nodes along edges that are not at an
> intersection and 2) sliver polygons.

[...]

> For cases in 2, I can remove some slivers with 'ST_RemEdgeModFace' but
> some of them I just can't delete:
> 
> I get either:
> 
> ERROR: TopoGeom 1123 in layer 1 (de_20k_topo_tests.LAYER1.) cannot be
> represented healing faces 1514 and 1502

This error means that a TopoGeometry object exists (with id=1123)
that's defined as containing only one of the faces separated by the
edge you're trying to remove.

The fix here would be to find faces that take part in the composition
of multiple TopoGeometry objects and those NOT taking part in the 
composition of any TopoGeometry object. I've seen GRASS GUIs referring
to those 2 classes as "polygon0" and "polygon2", enough that I've been
thinking it could be useful to have them shown as layers in the QGIS
viewer for PostGIS Topology. You should be able to extract those faces
with a query to the relation and the layers tables.

So basically you first have to fix the TopoGeometry objects and then
can safely drop the no-more-needed edges.

> Or, when trying with remove a node with 'topology.ST_NewEdgeHeal':
> 
> ERROR:  SQL/MM Spatial exception - other edges connected (3912)
> 
> In this particular example, two edges are connected two the same two
> nodes, similar to what was discussed here:
> 
> http://postgis.17.x6.nabble.com/PostGIS-1955-Exception-when-2-edges-passed-to-ST-ModEdgeHeal-that-are-attached-to-the-same-2-nodes-td4999383.html
> 
> But according to that discussion thread, this was fixed in an earlier
> version (I'm using topology version 2.1.3).
> 
> Maybe my problem is different but I'll need your help to get it
> sorted. Here's an example showing the small face (1502) I want remove:
> 
> https://dl.dropboxusercontent.com/u/5196336/example1.bmp

Which edge ids did you pass to ST_NewEdgeHeal ?
Is the topology in a good state according to topology.ValidateTopology ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the postgis-users mailing list