[postgis-tickets] r15891 - Be slightly looser in dupe detection in gridding

Paul Ramsey pramsey at cleverelephant.ca
Wed Oct 4 15:40:18 PDT 2017


Author: pramsey
Date: 2017-10-04 15:40:18 -0700 (Wed, 04 Oct 2017)
New Revision: 15891

Modified:
   trunk/liblwgeom/ptarray.c
Log:
Be slightly looser in dupe detection in gridding
(References #3877)


Modified: trunk/liblwgeom/ptarray.c
===================================================================
--- trunk/liblwgeom/ptarray.c	2017-10-04 21:27:43 UTC (rev 15890)
+++ trunk/liblwgeom/ptarray.c	2017-10-04 22:40:18 UTC (rev 15891)
@@ -1890,9 +1890,9 @@
 		}
 
 		/* Skip duplicates */
-		if ( p_out && p_out->x == p->x && p_out->y == p->y
-		   && (ndims > 2 ? p_out->z == p->z : 1)
-		   && (ndims > 3 ? p_out->m == p->m : 1) )
+		if ( p_out && FP_EQUALS(p_out->x, p->x) && FP_EQUALS(p_out->y, p->y)
+		   && (ndims > 2 ? FP_EQUALS(p_out->z, p->z) : 1)
+		   && (ndims > 3 ? FP_EQUALS(p_out->m, p->m) : 1) )
 		{
 			continue;
 		}



More information about the postgis-tickets mailing list