From: | "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com> |
---|---|
To: | CSN <cool_screen_name90001(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Finding points within 50 miles |
Date: | 2005-06-27 08:09:11 |
Message-ID: | 200506270109.11602.uwe@oss4u.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
in the where clause use something like (requires the earthdistance contrib to
be installed):
geo_distance(point([origin longitude],[origin latitude]),point([target
longitude column],[target latitude column])))::int <= 50
On Sunday 26 June 2005 04:40 pm, CSN wrote:
> If I have a table of items with latitude and longitude
> coordinates, is it possible to find all other items
> that are within, say, 50 miles of an item, using the
> geometric functions
> (http://www.postgresql.org/docs/8.0/interactive/functions-geometry.html)?
> If so, how?
>
> Thanks,
> CSN
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
UC
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
From | Date | Subject | |
---|---|---|---|
Next Message | Ulrich Wisser | 2005-06-27 08:37:46 | vacuum error |
Previous Message | Janning Vygen | 2005-06-27 07:47:36 | Re: Finding points within 50 miles |