[postgis-users] snapping a table to itself

Richard Greenwood richard.greenwood at gmail.com
Thu Oct 28 08:31:49 PDT 2021

Thanks for the suggestions. I was starting down the path you suggest of
creating nodes from the polygons and the ST_ConstranedDelaunayTriangles()
but I decided to post my question here first in case I was missing some
existing PostGIS goodness.

I couldn't get pprepair to build on Ubuntu 20.04. Possibly too new of a
cgal version:
  717 |   void remove_constraint(Constraint_id cid)
/usr/include/CGAL/Constrained_triangulation_plus_2.h:717:8: note:
candidate expects 1 argument, 2 provided


On Wed, Oct 27, 2021 at 11:35 AM Darafei "Komяpa" Praliaskouski <
me at komzpa.net> wrote:

> Hey,
> In the past I've used https://github.com/tudelft3d/pprepair for this kind
> of data. Nowadays you can node the linework, take the
> ConstranedDelaunayTriangles of it and reassign all of the triangles to
> closest polygons to re-union back to simulate it.
> On Wed, Oct 27, 2021 at 8:15 PM Richard Greenwood <
> richard.greenwood at gmail.com> wrote:
>> I would like to automate the cleanup of a vector later. Neither ST_Snap()
>> nor ST_SnapToGrid() are doing it for me. I've got a little sketch below in
>> which I've attempted to illustrate my problem with ST_SnapToGrid(). The
>> green lines represent the vector layer that I'd like to clean up. I'd like
>> the four vertices to be snapped together. The red lines represent the grid.
>> So in this case the four vertices all fall in different grid cells and no
>> snapping occurs despite the vertices being closer together than the grid
>> size. The data is irregular so setting an origin will not be of much use.
>> Any suggestions?
>> [image: image.png]
>> --
>> Richard W. Greenwood
>> www.greenwoodmap.com
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users

Richard W. Greenwood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211028/9e3ed9a7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 8372 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211028/9e3ed9a7/attachment.png>

More information about the postgis-users mailing list