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 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 Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] >
distance
Description: Binary data
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html