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

Sandro Santilli strk at keybit.net
Sat Nov 8 04:32:06 PST 2014


On Fri, Nov 07, 2014 at 01:14:31PM -0800, Guillaume Drolet wrote:
> I finally finished cleaning my topology, using a mix of SQL commands,
> functions, and also using Sandro's QGIS topology editor plugin. 

Congratulations! 

> In parallel, I also tried going the GRASS route, importing my original
> shapefile in GRASS and applying the cleaning function (v.clean ...) as
> suggested by Remi. I injected the result into PostGIS and created a
> topology. Most of the 23 slivers were there in the topology so one of two
> things: 1) GRASS didn't fix them (maybe I didn't choose an appropriate
> tolerance) or 2) they were created by PostGIS when building the topology.

I can't help here as I've never used GRASS for that yet.
Would be interested in knowing more though. Maybe Remi can help there.

> I'm gonna ask you one last thing if I may: I want to replace the original
> geom column (i.e. that used to build the topogeom) with a topologically
> correct one, and keep all the associated ecological attributes. Is this the
> right way to do it:
> 
> UPDATE syshiera.de_20k SET geom = topogeom::geometry; ?

Yes, that gives you a topologically correct "snapshot" of current
topology state (assuming you have no more unassigned or multiply-assigned
faces).

Note that there might still be cases in which the universal face enters
between two faces creating small gaps. I guess a way to check that would
be by computing angle between edges around each node and ensuring none
is below a given threshold (just ideas for more development to improve
coverage of useful functions ;)

--strk;

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


More information about the postgis-users mailing list