Re: [GENERAL] Finding points within 50 miles

2005-06-28 Thread Vivek Khera
On Jun 27, 2005, at 8:42 PM, Bruno Wolff III wrote: Google is your friend. There are places that sell very well kept zipcode databases for under $50. The US government gives it away for free. Look for "tiger". That is stale data. Vivek Khera, Ph.D. +1-301-869-4449 x806 smime.p7s Des

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Bruno Wolff III
On Mon, Jun 27, 2005 at 17:09:37 -0400, Vivek Khera <[EMAIL PROTECTED]> wrote: > > On Jun 27, 2005, at 4:36 PM, John Browne wrote: > > >I'm interested in doing a project for calculating distances similar to > >this. Anyone have suggestions on how/where this type of data can be > >obtained? Is

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Vivek Khera
On Jun 27, 2005, at 4:36 PM, John Browne wrote: I'm interested in doing a project for calculating distances similar to this. Anyone have suggestions on how/where this type of data can be obtained? Is it freely available anywhere? Google is your friend. There are places that sell very well

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread John Browne
I'm interested in doing a project for calculating distances similar to this. Anyone have suggestions on how/where this type of data can be obtained? Is it freely available anywhere? On 6/27/05, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: > > Actually it does. > I'm using a bounding box too. I

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Uwe C. Schroeder
Actually it does. I'm using a bounding box too. I have a stored procedure to get me what I need - here's the relevant part of it. Explanation: zc is the record holding the point of origin. I just added the maxdistance definition for this, because in my function its a parameter. SELEC

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Bruno Wolff III
On Sun, Jun 26, 2005 at 16:40:03 -0700, CSN <[EMAIL PROTECTED]> 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/

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Vivek Khera
On Jun 26, 2005, at 7: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)?

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Vivek Khera
On Jun 27, 2005, at 3:47 AM, Janning Vygen wrote: I had some problems with the calculation inside acos() sometimes being greater than 1, which should not occur. Please use a CASE WHEN sin(...) > 1 THEN 1 ELSE sin(...) END if you have the same problem. We've seen this as well with the di

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Alban Hertroys
Uwe C. Schroeder wrote: 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 I don't suppose geo_distance really returns

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Oleg Bartunov
How big is your data ? There are rather sophisticated and very effective methods in astronomy. For example, http://www.sai.msu.su/~megera/oddmuse/index.cgi/SkyPixelization, http://www.sai.msu.su/~megera/oddmuse/index.cgi/pg_sphere Oleg On Mon, 27 Jun 2005, Janning Vygen wrote: Am Monta

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Uwe C. Schroeder
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

Re: [GENERAL] Finding points within 50 miles

2005-06-27 Thread Janning Vygen
Am Montag, 27. Juni 2005 01:40 schrieb CSN: > 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-geometr

[GENERAL] Finding points within 50 miles

2005-06-26 Thread CSN
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 ___