]> granicus.if.org Git - postgis/commitdiff
#2634, regression in sphere distance code
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 7 Mar 2014 23:58:34 +0000 (23:58 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 7 Mar 2014 23:58:34 +0000 (23:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12305 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
liblwgeom/lwgeodetic.c

diff --git a/NEWS b/NEWS
index 2da914487ff564f52dfadee98c015c80b3746d1b..521b7bb59a2984f1fc1a07639ee3c0a11d66d48a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,7 @@ PostGIS 2.2.0
   - #2607, Cannot open more than 1024 out-db files in one process
   - #2615, EstimatedExtent (and hence, underlying stats) gathering wrong bbox
   - #2556, geography ST_Intersects results depending on insert order
+  - #2634, regression in sphere distance code
 
  * Code refactoring *
 
index bc8bf05948435cd7b2a2eb3ee493009a6d245e6d..214d64db6a62c15acfa49af068d0ffcc461721bb 100644 (file)
@@ -1814,12 +1814,8 @@ static double ptarray_distance_spheroid(const POINTARRAY *pa1, const POINTARRAY
                        }
                        e1.start = e1.end;
                }
-               /* On sphere, return answer */
-               if ( use_sphere )
-                       return distance;
-               /* On spheroid, calculate final answer based on closest approach */
-               else
-                       return spheroid_distance(&g1, &nearest2, s);
+
+               return spheroid_distance(&g1, &nearest2, s);
        }
 
        /* Initialize start of line 1 */