[GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread mike cox
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.

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread Tom Lane
mike cox <[EMAIL PROTECTED]> 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. regards, tom lane ---(end of broadcast

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread Michael Fuhr
On Sat, Oct 02, 2004 at 07:09:25PM -0400, Tom Lane wrote: > mike cox <[EMAIL PROTECTED]> 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

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread Bruno Wolff III
On Sat, Oct 02, 2004 at 17:55:31 -0600, Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Sat, Oct 02, 2004 at 07:09:25PM -0400, Tom Lane wrote: > > mike cox <[EMAIL PROTECTED]> writes: > > > The distance from Portland to Seattle is not 128862 > > > miles. > > > > How about 128.8 kilometers? The ear

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread Jean-Luc Lachance
Maybe it would work with the right long & lat... try Protland OR -122.67555, 45.51184 Seattle WA -122.32956, 47.60342 Also, do not forget that it is the line distance not the driving distance. Michael Fuhr wrote: On Sat, Oct 02, 2004 at 07:09:25PM -0400, Tom Lane wrote: mike cox <[EMAIL PROTECTED]

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread Michael Fuhr
On Sat, Oct 02, 2004 at 09:29:16PM -0400, Jean-Luc Lachance wrote: > Maybe it would work with the right long & lat... > try > Protland OR -122.67555, 45.51184 > Seattle WA -122.32956, 47.60342 It doesn't matter which hemisphere the longitudes are in as long as they're in the same hemisphere: test

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-02 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > What *does* matter is that one specify (lat, lon) instead of > (lon, lat): The earthdistance README does specify that latitude is the first argument, but it doesn't get the function name right :-( ... it says ll_to_cube instead of ll_to_earth. Anyone wan

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-03 Thread Edmund Bacon
[EMAIL PROTECTED] (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(

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-03 Thread Jean-Luc Lachance
I agree, NS or EW long lat should be the same. I was just pointing to the wrong figure. Also, if ll_to_earth takes lat first, it should report an error for a |lat| > 90... Michael Fuhr wrote: On Sat, Oct 02, 2004 at 09:29:16PM -0400, Jean-Luc Lachance wrote: Maybe it would work with the right lo

Re: [GENERAL] earthdistance is not giving correct results.

2004-10-03 Thread Bruno Wolff III
On Sun, Oct 03, 2004 at 11:36:20 -0400, Jean-Luc Lachance <[EMAIL PROTECTED]> wrote: > I agree, NS or EW long lat should be the same. > I was just pointing to the wrong figure. Also, if ll_to_earth takes lat > first, it should report an error for a |lat| > 90... I disagree with this. Latitudes