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

John Abraham jea at hbaspecto.com
Mon Nov 3 10:09:11 PST 2014


Just FYI in case you’re interested I found it much easier to use the triangle algorithm here https://github.com/tudelft3d/pprepair on an exported shape file 
It’s called Planar Partition Repair.  It got rid of all the slivers and overlaps with ease.

Here is the paper http://www.gdmc.nl/ken/files/12_pfg.pdf and thanks to Martijn Meijers and team.

Then I rebuilt the topology layer in PostGIS from the fixed up Simple Feature Class multi polygon layer.

--
John Abraham
jea at hbaspecto.com
403-232-1060

On Nov 3, 2014, at 9:13 AM, Rémi Cura <remi.cura at gmail.com> wrote:

> Just for completeness sake,
> if your input geom is really ambiguous with the precision you choose,
> it may be faster in both human and machine time to use grass 7 to import and clean the topology,
> then export from grass 7 to postgis topology with the built-in grass function.
> 
> I ressort sometime to this trick because grass cleaning functionality are very advanced.
> 
> Cheers,
> Rémi-C
> 
> 
> 2014-11-03 17:04 GMT+01:00 Guillaume Drolet <droletguillaume at gmail.com>:
> Sandro Santilli wrote
> >> I suggest you take a look at edges having face 1831 on either
> >> the right or left edge. Do any edge exist ?
> >
> > edge 5187 has face 1831 as its right face
> >
> >> The correct procedure to drop those slivers would be to assign
> >> those small areas to the (closest|biggest|leftmost|youpickit)
> >> TopoGeometry object, to one and only one, and then, if you really
> >> need it, drop the edge internal to the TopoGeometry.
> >
> >> I made a QGIS plugin which may help you do some of these things
> >> manually, which is useful in some cases, mainly to understand the
> >> issues.
> >
> > The plugin you made is a great tool (thanks). I will first try to get the
> > number of slivers down to
> > a manageable number, which I had with setting the tolerance at 2.0 m, and
> > then apply the
> > TopoGeometry approach above.
> >
> >> So the error was right about there being another edge attached to the
> >> node:
> >
> >>  ERROR:  SQL/MM Spatial exception - other edges connected (3912)
> >
> >> I'm guessing 3912 and 3908 are the two parallel edges in the picture
> >> you attached: https://dl.dropboxusercontent.com/u/5196336/example1.bmp
> >
> > You're right, they are the two parallel edges. And it's the same for most
> > of
> > the some 650 slivers I have.
> >
> >> Again, QGIS may help you getting more info out of the visual, enable
> >> the DBManager core plugin, select your topology schema and select
> >> Schema->TopoViewer from the menu.
> >
> > I didn't know about the TopoViewer tool. I was importing the topology
> > tables (node, edge, face)
> > like any other PG geometry tables. Will explore with this new tool.
> >
> >
> >> It's probably easier to clean up nodes for an areal topology than to
> >> clean up faces. With my QGIS plugin (PostGIS Topology Editor) you can
> >> select all nodes and click on a button which will drop all the ones
> >> that are safe to drop.
> >
> > You're right! I'll create my topology again but with the 2.0 m tolerance,
> > then run
> > my function for getting rid of nodes that are not at intersections and
> > finally,
> > I will use the approach you suggested of working with the TopoGeometry
> > objects and the
> > relation table to eliminate the remaining slivers.
> >
> > Will keep you posted on how it goes. Again, I really appreciate your help.
> > Thanks.
> >
> > Guillaume.
> 
> 
> 
> 
> 
> --
> View this message in context: http://postgis.17.x6.nabble.com/Topology-cannot-delete-slivers-or-gaps-tp5007250p5007266.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141103/82e5e6f6/attachment.html>


More information about the postgis-users mailing list