[postgis-tickets] [PostGIS] #4990: getfacecontainingpoint fails on i386
PostGIS
trac at osgeo.org
Sun Sep 26 12:01:58 PDT 2021
#4990: getfacecontainingpoint fails on i386
-----------------------------+---------------------------
Reporter: Bas Couwenberg | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.2.0
Component: topology | Version: master
Resolution: | Keywords:
-----------------------------+---------------------------
Comment (by strk):
Ok something is definitely fishy here. Adding a debug line in ptarray.c
changes results so that the closest segment is reported as being 0 instead
of 1. With just this patch:
{{{
diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c
index 7994d60dd..fe23282ea 100644
--- a/liblwgeom/ptarray.c
+++ b/liblwgeom/ptarray.c
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include "../postgis_config.h"
-/*#define POSTGIS_DEBUG_LEVEL 4*/
+#define POSTGIS_DEBUG_LEVEL 4
#include "liblwgeom_internal.h"
#include "lwgeom_log.h"
@@ -1308,6 +1308,7 @@ ptarray_closest_segment_2d(const POINTARRAY *pa,
const POINT2D *qp, double *dist
double dist_sqr;
end = getPoint2d_cp(pa, t);
dist_sqr = distance2d_sqr_pt_seg(qp, start, end);
+ LWDEBUGF(3, "Sqr distance from seg %d: %g", t-1,
dist_sqr);
if (dist_sqr < mindist)
{
}}}
I guess it's time to valgrind the liblwgeom side of this
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4990#comment:25>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list