]> granicus.if.org Git - postgis/commitdiff
0se FP_TOLERANCE instead of 0
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 May 2015 19:07:02 +0000 (19:07 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 May 2015 19:07:02 +0000 (19:07 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13564 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_measurement.c

index e367a107fea728a4ecad7a07c85467fb80d4f943..c716d5283a8c2fba17d63cbca49f791641db35f0 100644 (file)
@@ -62,7 +62,7 @@ Datum geography_distance_uncached(PG_FUNCTION_ARGS)
        GSERIALIZED *g1 = NULL;
        GSERIALIZED *g2 = NULL;
        double distance;
-       double tolerance = 0.0;
+       double tolerance = FP_TOLERANCE;
        bool use_spheroid = true;
        SPHEROID s;
 
@@ -100,7 +100,7 @@ Datum geography_distance_uncached(PG_FUNCTION_ARGS)
        lwgeom_add_bbox_deep(lwgeom1, NULL);
        lwgeom_add_bbox_deep(lwgeom2, NULL);
        
-       distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &s, FP_TOLERANCE);
+       distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &s, tolerance);
 
        /* Clean up */
        lwgeom_free(lwgeom1);