[postgis-users] ST_snap doesn't snap within the tolerance

Sandro Santilli strk at keybit.net
Wed Jul 11 06:07:27 PDT 2012


Snapping has a few limitations.
One is that only vertices in the target are considered as snap points,
so you'll never get a vertex of first geometry snapped against a segment
of the second.

See if this could explain your problem. 

--strk;

On Wed, Jul 11, 2012 at 12:50:30PM +0000, Astrid Bjørnerød wrote:
> I want some polygons (with attribute artype=21) to snap into some neighbor-polygon. I have set the tolerance to 5m.
> Put not all of the polygons in the result has been snapping, the gap is under the tolerance.
> The sql:
> create table test_ar5jm.snipsnap AS SELECT p1.jmsign,ST_Union(ST_Buffer(ST_Snap(p1.geo,p2.geo, 5),0)) as geo
> FROM test_ar5jm.temp_aij_flate
> AS p1 CROSS JOIN test_ar5jm.temp_aij_flate As p2
> WHERE p1.artype = 21
> GROUP BY p1.jmsign;
> 
> Figures from QGis before snapping and after snapping in attachedment.
> 
> Vennlig hilsen
> Astrid Bjørnerød
> 
> Seksjon Geomatikk
> -------------------------------------------
> Norsk institutt for skog og landskap
> Pb 115, NO-1431 Ås
> T (+47) 64 94 96 96
> F (+47) 64 94 80 01
> -------------------------------------------
> www.skogoglandskap.no<http://www.skogoglandskap.no>
> -------------------------------------------
> 



More information about the postgis-users mailing list