> 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.
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])
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
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