[postgis-users] Problem using ST_snap

Alexandre Neto senhor.neto at gmail.com
Wed Sep 24 04:41:52 PDT 2014


Hello all,

I have to tables in postgis. table one has a set of adjacent polygons that
covers all my area o interest, while table to have a few polygons across
the same area.

Some boundaries of table 2 should snap to the table 1 polygons, but they
don't.

I'm trying to use st_snap to correct this, but I'm not being able to do it.
There are vertices that "refuse" to change while other (just a few do). I'm
already using a very big tolerance.

 Therefore I need your help to see if my query looks correct or not.


WITH snap_grid as
(
SELECT
    St_Collect(f.geom) as geom
FROM
    table_1 as f
)
SELECT
    r.gid, st_snap(r.geom,q.geom,10) as geom
FROM
    table2 as r,
    snap_grid as q
WHERE r.gid = 53

I already tried dumping all point form the table 1 polygons, but the result
is "similar".

Thanks in advance,

Alexandre Neto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140924/94286767/attachment.html>


More information about the postgis-users mailing list