]> granicus.if.org Git - postgis/commitdiff
Performance tweak to distance calculations with tolerance. If distance is much less...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 12 Jan 2010 00:25:24 +0000 (00:25 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 12 Jan 2010 00:25:24 +0000 (00:25 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5114 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_measurement.c

index 319198d12fd012b6ea4e758040a21ba6b555c0d5..863b7c3ae09a00fefce2a5b0c3e5551d51ad06f2 100644 (file)
@@ -85,7 +85,7 @@ Datum geography_distance(PG_FUNCTION_ARGS)
                PG_RETURN_NULL();
        }
        
-       distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &gbox1, &gbox2, &s, 0.0);
+       distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &gbox1, &gbox2, &s, FP_TOLERANCE);
 
        /* Something went wrong, negative return... should already be eloged, return NULL */
        if( distance < 0.0 )