Re: [SQL] Search by longitude/latitude

2001-10-08 Thread Joe Conway
> Hi all, > > I need to implement "Find all hospitals in a 5 mile radius". Say I have all > the coordinates on them stored in a table with the fields longitude and > latitude. Has anybody some sample code for that? > > Best regards, > Chris > Here's a plpgsql function that will do what you need.

Re: [SQL] Search by longitude/latitude

2001-10-08 Thread Colin 't Hart
Better still, check out PostGIS at http://postgis.refractions.net/ Cheers, Colin ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Search by longitude/latitude

2001-10-08 Thread James Orr
Here is some perl code which does what you want. - Original Message - From: "Chris Ruprecht" <[EMAIL PROTECTED]> To: "pgsql" <[EMAIL PROTECTED]> Sent: Monday, October 08, 2001 8:58 AM Subject: [SQL] Search by longitude/latitude > Hi all, > > I n

[SQL] Search by longitude/latitude

2001-10-08 Thread Chris Ruprecht
Hi all, I need to implement "Find all hospitals in a 5 mile radius". Say I have all the coordinates on them stored in a table with the fields longitude and latitude. Has anybody some sample code for that? Best regards, Chris _ Do You Yah