[postgis-users] degrees between points

Nicholas Lan Nicholas.Lan at ursaminor.nl
Wed Jan 16 08:45:10 PST 2008


I was under the impression that using srid 4326 meant that point coordinates
would correspond to latitude and longitude on a spheroid such that
st_distance(...) between two such points would give the angle between them,
hence 90 in this case. As you say, st_distance is treating these points as
cartesian coordinates, giving 127. I guess I've got the wrong idea
somewhere.

Regards
Nicholas Lan
  
________________________________


This e-mail communication contains confidential information that may also be
privileged. It is intended for the exclusive use of the addressees. If you
are not the person or organization to whom it is addressed, you must not
copy, distribute or take any action based on the information contained
within. If you have received this communication in error, please notify Ursa
Minor B.V. immediately [telephone +31 (0) 15 2682559]. Ursa Minor B.V. will
not accept liability for contractual commitments made by individuals
employed by this company outside the scope of our business.


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Chris
Hermansen
Sent: Wednesday, January 16, 2008 5:36 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] degrees between points

Nicholas:

sqrt(90*90 + 90*90) is about equal to 127, as ST_DISTANCE() reports. 
Why are you expecting your distance to be 90?

Nicholas Lan wrote:
>
> Hello,
>
>  
>
> I’m a newbie and have been trying to find the degrees between points
> on a sphere. From reading the documentation I have a table with column
> named “4326” of srid 4326.
>
>  
>
> I insert into this column a point, Geomfromtext(POINT(0 0), 4326)
>
>  
>
> And then doing
>
>  
>
> select ST_DISTANCE("4326",Geomfromtext('POINT(90 90)', 4326)) as dist
> from test3;
>
>  
>
> I expected to see 90 but got 127. What am I doing wrong? Sorry if this
> is a stupid question.
>
>  
>
> Regards
>
> Nicholas Lan
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   


-- 
Regards,

Chris Hermansen · mailto:clh at timberline.ca
tel:+1.604.714.2878 · fax:+1.604.733.0631
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5

C'est ma façon de parler.

_______________________________________________
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