Re: earthdistance is not giving correct results. - Mailing list pgsql-general

From Edmund Bacon
Subject Re: earthdistance is not giving correct results.
Date
Msg-id m2fz4woiap.fsf@PowerPC.local
Whole thread Raw
In response to earthdistance is not giving correct results.  (mike cox <mikecoxlinux@yahoo.com>)
List pgsql-general
mikecoxlinux@yahoo.com (mike cox) writes:

> I'm running PostgreSQL 8.0 beta 1.  I'm using the
> earthdistance to find the distance between two
> different latitude and logitude locations.
> Unfortunately, the result seems to be wrong.
>
> Here is what I'm doing:
> select
> earth_distance(ll_to_earth('122.55688','45.513746'),ll_to_earth('122.396357','47.648845'));
>
> The result I get is this:
>

I believe ll_to_earth() is expecting ll_to_earth(latitude, longitude),

Also, I think earth_distance returns it's value in meters.

pgsql-general by date:

Previous
From: dperiwal@softwaretree.com (Damodar Periwal)
Date:
Subject: See the good, the bad, and the ugly of your Postgres data with OneClickRevelation(tm)
Next
From: mikecoxlinux@yahoo.com (Mike Cox)
Date:
Subject: earthdistance results seem to be wrong.