Re: [postgis-users] snapping a table to itself

2021-10-28 Thread Richard Greenwood
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

Thanks,
Rich


On Wed, Oct 27, 2021 at 11:35 AM Darafei "Komяpa" Praliaskouski <
m...@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.greenw...@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@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>
> ___
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>


-- 
Richard W. Greenwood
www.greenwoodmap.com
___
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users


Re: [postgis-users] snapping a table to itself

2021-10-27 Thread Komяpa
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.greenw...@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@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
___
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users


[postgis-users] snapping a table to itself

2021-10-27 Thread Richard Greenwood
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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users