[postgis-tickets] r16166 - Bring epsilon fix to minimum bounding circle back to 2.4 (closes #3930)

Paul Ramsey pramsey at cleverelephant.ca
Wed Dec 20 06:30:19 PST 2017


Author: pramsey
Date: 2017-12-20 06:30:19 -0800 (Wed, 20 Dec 2017)
New Revision: 16166

Modified:
   branches/2.4/NEWS
   branches/2.4/liblwgeom/lwboundingcircle.c
Log:
Bring epsilon fix to minimum bounding circle back to 2.4 (closes #3930)


Modified: branches/2.4/NEWS
===================================================================
--- branches/2.4/NEWS	2017-12-20 14:28:56 UTC (rev 16165)
+++ branches/2.4/NEWS	2017-12-20 14:30:19 UTC (rev 16166)
@@ -5,6 +5,8 @@
   - #3713, Support encodings that happen to output a '\' character
   - #3827, Set configure default to not do interrupt testing,
           was causing false negatives for many people
+  - #3930, Minimum bounding circle issues on 32-bit platforms
+
  * Enhancements *
   - #3944, Update to EPSG register v9.2 (Even Rouault)
 

Modified: branches/2.4/liblwgeom/lwboundingcircle.c
===================================================================
--- branches/2.4/liblwgeom/lwboundingcircle.c	2017-12-20 14:28:56 UTC (rev 16165)
+++ branches/2.4/liblwgeom/lwboundingcircle.c	2017-12-20 14:30:19 UTC (rev 16166)
@@ -87,7 +87,7 @@
 	if (!c)
 		return LW_FALSE;
 
-	if (distance2d_pt_pt(p, c->center) > c->radius)
+	if (distance2d_pt_pt(p, c->center) - c->radius > DBL_EPSILON)
 		return LW_FALSE;
 
 	return LW_TRUE;



More information about the postgis-tickets mailing list