[postgis-users] snapping a table to itself

Darafei "Komяpa" Praliaskouski me at komzpa.net
Wed Oct 27 10:35:08 PDT 2021


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211027/062a9be2/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/20211027/062a9be2/attachment.png>

More information about the postgis-users mailing list