Radius of a zip code

Поиск
Список
Период
Сортировка
От Andy Lewis
Тема Radius of a zip code
Дата
Msg-id 000b01c3cc09$e043fd70$0201a8c0@andy2
обсуждение исходный текст
Ответы Re: Radius of a zip code  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Radius of a zip code  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-sql
Hello all,
 
I was trying to find all zip codes within a given zip code or radius.
 
I have map points and Latitude and Longitude in my zip table.
 
I remember seeing a post or two referencing this but can't see to find it.
 
I've tried the following with no luck:
 
-- 20 Miles
--select 20 * 360.0 / (7900.0 * atan2(1,1) * 4.0);
select * from zip_code where map_loc @ circle(map_point('dallas','tx','75201'), .290105212724467 ) order by city
 
Anyone that has this experience, can you validate this for correctness?
 
Thanks in advance,
 
Andy

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Anti log in PostgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Radius of a zip code