Re: locating cities within a radius of another

Поиск
Список
Период
Сортировка
От Geoffrey
Тема Re: locating cities within a radius of another
Дата
Msg-id 4C489AB0.2090900@serioustechnology.com
обсуждение исходный текст
Ответ на Re: locating cities within a radius of another  (Oliver Kohll - Mailing Lists <oliver.lists@gtwm.co.uk>)
Список pgsql-general
Oliver Kohll - Mailing Lists wrote:
>
> On 22 Jul 2010, at 12:57, Geoffrey wrote:
>
>>> For completeness, the earthdistance module also provides the distance
>>> between two lat/longs, the point<@>point syntax is simple to use:
>>> http://www.postgresql.org/docs/8.3/static/earthdistance.html
>>
>> Disgregard my last post, Surely as soon as I hit send, the light went
>> on...  I'm looking at deriving my points for point <@> point from
>> ll_to_earth().
>
> I constructed mine using point(longitude, latitude), where long and lat
> are double precision, which returns a datatype of type point.
> ll_to_earth() looks like it returns a datatype of type earth, so not
> sure if it will work. Maybe things have changed in a recent release,
> please let me know if so.
>
> So an example would be
> select point(-2.2171,56.8952)<@>point(-1.2833,51.6667) as miles;
>       miles
> ------------------
>  363.202864676916
> (1 row)

Perfect, that appears to work for me as well, thanks.

>
> Regards
> Oliver Kohll
>
> oliver@agilebase.co.uk <mailto:oliver@agilebase.co.uk> / +44(0)7814
> 828608 / skype:okohll
> www.agilebase.co.uk <http://www.agilebase.co.uk> - software
>
>
>


--
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson

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

Предыдущее
От: Tim Landscheidt
Дата:
Сообщение: Re: How to distribute quantity if same product is in multiple rows
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Clarification of the "simple" dictionary