]> granicus.if.org Git - postgis/commitdiff
#2168, ST_Distance is not always commutative
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 5 Jun 2013 21:01:48 +0000 (21:01 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 5 Jun 2013 21:01:48 +0000 (21:01 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11530 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
postgis/geography_measurement.c

diff --git a/NEWS b/NEWS
index 491223172c11db927513573f3fea12e65da64fa2..97f8e023bae84d5cc5ee9f312849b9311320af0b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -185,6 +185,7 @@ PostGIS 2.1.0
   - #2100, ST_AsRaster may not return raster with specified pixel type
   - #2126, Better handling of empty rasters from ST_ConvexHull()
   - #2165, ST_NumPoints regression failure with CircularString
+  - #2168, ST_Distance is not always commutative
   - #2182, Fix issue with outdb rasters with no SRID and ST_Resize
   - #2188, Fix function parameter value overflow that caused problems
            when copying data from a GDAL dataset
index 952ddefe540cbc6064d9a942d7dedce8d6364155..5dec9ffc3cb72139828621acaa7c727171760126 100644 (file)
@@ -169,6 +169,9 @@ Datum geography_distance(PG_FUNCTION_ARGS)
                PG_RETURN_NULL();
        }
 
+    /* Knock off any funny business at the micrometer level, ticket #2168 */
+    distance = round(distance * 10e8) / 10e8;
+
        PG_RETURN_FLOAT8(distance);
 }