Re: Need Help to implement Proximity search feature

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Need Help to implement Proximity search feature
Дата
Msg-id 52D837BD.5000005@hogranch.com
обсуждение исходный текст
Ответ на Re: Need Help to implement Proximity search feature  (itishree sukla <itishree.sukla@gmail.com>)
Список pgsql-general
On 1/16/2014 1:52 AM, itishree sukla wrote:
> we have Database, but not ready for Geocode use.  what i understood
> from different blog, we should have latitude and longitude either
> based on addresses, or postal code we have. However if I will get the
> lat and long, need to calculate earth distance to give  location based
> on user location. Formula i got, is calculating shortest distance,
> which always not true practically. Please address my concern, how i
> will get rid of these issues.

for determining closest proximity, you probably don't need accurate
spherical earth distance, simple cartesian distance is good enough as
you're only interested in relative values.  for this, you can use the
built in postgresql POINT data type, and the <->  distance operator.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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

Предыдущее
От: Rémi Cura
Дата:
Сообщение: Re: expert : SRF returning double[]
Следующее
От: Bartosz Dmytrak
Дата:
Сообщение: Re: Any freeware graphic display of DDL software available?