Re: earthdistance is not giving correct results.

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, mike cox <mikecoxlinux(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: earthdistance is not giving correct results.
Date: 2004-10-03 01:11:05
Message-ID: 20041003011105.GA19221@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Oct 02, 2004 at 17:55:31 -0600,
Michael Fuhr <mike(at)fuhr(dot)org> wrote:
> On Sat, Oct 02, 2004 at 07:09:25PM -0400, Tom Lane wrote:
> > mike cox <mikecoxlinux(at)yahoo(dot)com> writes:
> > > The distance from Portland to Seattle is not 128862
> > > miles.
> >
> > How about 128.8 kilometers? The earthdistance docs say it's in meters
> > unless you've redefined the base unit.
>
> 128.8 kilometers is about 80 miles; the distance from Portland to
> Seattle is more like 150 miles.
>
> > > earth_distance(ll_to_earth('122.55688','45.513746'),ll_to_earth('122.396357','47.648845'));
>
> I haven't played with earthdistance, but I'd guess that the arguments
> to ll_to_earth should be (latitude, longitude) instead of (longitude,
> latitude).

I double checked to make sure the README file says the right thing and it
does say that latitude is the first argument and longitude the second.
So it just looks like the arguments were given in the wrong order.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2004-10-03 01:26:36 Re: VACUUM FULL on 24/7 server
Previous Message Michael Fuhr 2004-10-02 23:55:31 Re: earthdistance is not giving correct results.