Re: Postal code radius searches
| От | postgresql@fruru.com |
|---|---|
| Тема | Re: Postal code radius searches |
| Дата | |
| Msg-id | Pine.LNX.4.44.0202062026180.25135-100000@mail.conostix.com обсуждение исходный текст |
| Ответ на | Postal code radius searches (Milo Hyson <milo@cyberlifelabs.com>) |
| Список | pgsql-general |
On Wed, 6 Feb 2002, Milo Hyson wrote: > figure out a fast way to locate all of the postal codes within an arbitrary > radius of another postal code. perhaps a "refined" brute force is ok : 1. take the point you want to calculate distances around 2. calculate the maximum and minimum latitude/longitude so that a city can be nearer than your distance limit (equivalent to going x km/mi north, south, east and west) 3. do a brute force search but limit yourself to the "square" (it's not really square ;-) around your starting point. If the distances are normally small, this should be able to use indexes on the coordinates and probably be a lot faster already. Hope this helps, Tycho -- Tycho Fruru tycho.fruru@conostix.com
В списке pgsql-general по дате отправления: