From 732c621c205cc81966f2b8f93ee5195d34e07fe0 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sun, 11 Oct 2015 20:31:30 +0000 Subject: [PATCH] Only consider closest edges for snapping to newly added point (#3329) This is a fix of r14155, which was the C version of the fix for #3280 git-svn-id: http://svn.osgeo.org/postgis/trunk@14251 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwgeom_topo.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c index 0a7b813c7..7be02d45b 100644 --- a/liblwgeom/lwgeom_topo.c +++ b/liblwgeom/lwgeom_topo.c @@ -5002,6 +5002,7 @@ lwt_AddPoint(LWT_TOPOLOGY* topo, LWPOINT* point, double tol) /* Order by distance if there are more than a single return */ if ( num > 1 ) {{ + int j; sorted = lwalloc(sizeof(scored_pointer)*num); for (i=0; igeom); + } } + num = j; lwfree(sorted); lwfree(edges); edges = edges2; -- 2.40.0