Re: distance calculation usng lat and long in miles

Поиск
Список
Период
Сортировка
От Uwe C. Schroeder
Тема Re: distance calculation usng lat and long in miles
Дата
Msg-id 200603080942.43020.uwe@oss4u.com
обсуждение исходный текст
Ответ на distance calculation usng lat and long in miles  (<sunithab@travelpost.com>)
Список pgsql-general
There is the earthdistance package in the contrib directory. You may want to
look into that.

On Wednesday 08 March 2006 09:10, sunithab@travelpost.com wrote:
> I have the lat and long data. I have created the geom column based on the
> lat and long data as below.
>
>
>      UPDATE property SET geom =GeometryFromText('POINT(' || long ||
>      ' ' || lat || ')',4326);
>
> Now I have the geom columns in two tables
>
> I am calculating the distance as below
>
> select distance(geom1, geom2)* 69.055
>
>
> It seems to be right. But I want to make sure.
>
> Thanks for help in advance.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

--
    UC

--
Open Source Solutions 4U, LLC    1618 Kelly St
Phone:  +1 707 568 3056        Santa Rosa, CA 95401
Cell:   +1 650 302 2405        United States
Fax:    +1 707 568 6416

В списке pgsql-general по дате отправления:

Предыдущее
От: brew@theMode.com
Дата:
Сообщение: Re: distance calculation usng lat and long in miles
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: distance calculation usng lat and long in miles