You're such a Black Team member, Regina :) I think the geography spheroid calculation falls back to a sphere calculation if it is handed the 180 case, and probably the 180 degree test is sufficiently fuzzy that it is picking up "pretty close" results. Worth a ticket, I'm sure we can make things a bit more consistent, for the geography type too.
P On Thu, Apr 22, 2010 at 10:24 AM, Paragon Corporation <[email protected]> wrote: > Also not entirely true. > > If we set to 179.9999 > > Answers are different > > Though 179 they are the same > > SELECT st_distance_spheroid(geomfromtext('POINT(0 0)',4326), > geomfromtext('POINT(179 > 0)',4326),'SPHEROID["WGS84",6378137,298.257223563]'); > > On 1.5 - 19926188.8494779 > > On 1.4 - 19926188.851996 > > However: > > SELECT st_distance_spheroid(geomfromtext('POINT(0 0)',4326), > geomfromtext('POINT(179.999 > 0)',4326),'SPHEROID["WGS84",6378137,298.257223563]'); > On 1.4 - 20037397.0232984 > On 1.5 - 19903482.0714439 > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Paragon > Corporation > Sent: Thursday, April 22, 2010 1:18 PM > To: 'PostGIS Users Discussion' > Subject: Re: [postgis-users] ST_length_spheroid and ST_distance_spheroid > > I think it's a difference in versions > > On our PostGIS 1.4 windows the answers are the same (note Paul was showing a > 1.4 answer I presume from his command prompt) > > On our PostGIS 1.5 its different. > > I suspect its because in > > PostGIS 1.5 the distance_spheroid piggy backs on the geography support to > support more than just points. > > I suspect the length_spheroid logic wasn't changed to do the same which is > why it gives the same answer as 1.4 > > Hope that helps, > Regina and Leo > http://www.postgis.us > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Olivier > Courtin > Sent: Thursday, April 22, 2010 1:07 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] ST_length_spheroid and ST_distance_spheroid > > > On Apr 22, 2010, at 6:54 PM, Paul Ramsey wrote: > >> If you change the 180 to 179 do the results match up again? (ie, do >> any distance less than a perfect half-sphere?) > > Yes, right assertion. > Values are the same below 180 > > -- > Olivier > > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
