[postgis-users] ST_length_spheroid and ST_distance_spheroid

Paragon Corporation lr at pcorp.us
Thu Apr 22 10:24:21 PDT 2010


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: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] 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: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] 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
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list