]> granicus.if.org Git - postgis/commitdiff
Be slightly looser in dupe detection in gridding
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 4 Oct 2017 22:40:18 +0000 (22:40 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 4 Oct 2017 22:40:18 +0000 (22:40 +0000)
(References #3877)

git-svn-id: http://svn.osgeo.org/postgis/trunk@15891 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/ptarray.c

index c1b907c29bc52f79f2ad29b8adb5bf52d9cba8ea..5f2ba157119012f13f4bbb826436c5e1b834366a 100644 (file)
@@ -1890,9 +1890,9 @@ ptarray_grid_in_place(POINTARRAY *pa, const gridspec *grid)
                }
 
                /* 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;
                }