Re: earthdistance is not giving correct results.

From: Edmund Bacon <ebacon(at)no(dot)where>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: earthdistance is not giving correct results.
Date: 2004-10-02 22:40:30
Message-ID: m2fz4woiap.fsf@PowerPC.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

mikecoxlinux(at)yahoo(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-10-02 22:46:58 Re: Bug with updateable Views and inherited tables?
Previous Message Net Virtual Mailing Lists 2004-10-02 22:12:46 Query problem...