From 1b475efe81e4efeba190b48ef87c78328ae418e2 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 7 Mar 2014 23:58:34 +0000 Subject: [PATCH] #2634, regression in sphere distance code git-svn-id: http://svn.osgeo.org/postgis/trunk@12305 b70326c6-7e19-0410-871a-916f4a2858ee --- NEWS | 1 + liblwgeom/lwgeodetic.c | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 2da914487..521b7bb59 100644 --- 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 * diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c index bc8bf0594..214d64db6 100644 --- a/liblwgeom/lwgeodetic.c +++ b/liblwgeom/lwgeodetic.c @@ -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 */ -- 2.50.1