| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Michael Fuhr <mike(at)fuhr(dot)org> |
| Cc: | Andy Lewis <jumboc(at)comcast(dot)net>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Radius of a zip code |
| Date: | 2003-12-27 04:34:04 |
| Message-ID: | 20031227043404.GB5264@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Fri, Dec 26, 2003 at 19:42:44 -0700,
Michael Fuhr <mike(at)fuhr(dot)org> wrote:
>
> I have several databases with lat/lon coordinates and frequently make
> "show me all records within a certain distance of this point" queries.
> I wrote a haversine() function that uses the Haversine Formula to
> calculate the great circle distance between two points on a sphere
> (assuming the earth is a perfect sphere is accurate enough for my uses).
> Here's a web site with related info:
The distance operator in contrib/earthdistance got changed to use
haversine instead of the naive formula in 7.3. In 7.4 it also provides
some functions that work with contrib/cube that allow for indexed
searches.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2003-12-27 05:19:52 | Re: Radius of a zip code |
| Previous Message | Michael Fuhr | 2003-12-27 03:53:37 | Re: MD5 encrypt |