pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Search by longitude/latitude 4+ messages / 4 participants [nested] [flat]
* Search by longitude/latitude @ 2001-10-08 12:58 Chris Ruprecht <chrup999@yahoo.com> 0 siblings, 2 replies; 4+ messages in thread From: Chris Ruprecht @ 2001-10-08 12:58 UTC (permalink / raw) To: pgsql-sql 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 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Search by longitude/latitude @ 2001-10-08 13:42 James Orr <james@lrgmail.com> parent: Chris Ruprecht <chrup999@yahoo.com> 1 sibling, 1 reply; 4+ messages in thread From: James Orr @ 2001-10-08 13:42 UTC (permalink / raw) To: Chris Ruprecht <chrup999@yahoo.com>; pgsql-sql Here is some perl code which does what you want. ----- Original Message ----- From: "Chris Ruprecht" <chrup999@yahoo.com> To: "pgsql" <pgsql-sql@postgresql.org> 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 majordomo@postgresql.org > Attachments: distance (application/octet-stream, 1.2K) download ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Search by longitude/latitude @ 2001-10-08 14:13 Colin 't Hart <cthart@yahoo.com> parent: James Orr <james@lrgmail.com> 0 siblings, 0 replies; 4+ messages in thread From: Colin 't Hart @ 2001-10-08 14:13 UTC (permalink / raw) To: pgsql-sql Better still, check out PostGIS at http://postgis.refractions.net/ Cheers, Colin ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Search by longitude/latitude @ 2001-10-08 15:33 Joe Conway <joseph.conway@home.com> parent: Chris Ruprecht <chrup999@yahoo.com> 1 sibling, 0 replies; 4+ messages in thread From: Joe Conway @ 2001-10-08 15:33 UTC (permalink / raw) To: Chris Ruprecht <chrup999@yahoo.com>; pgsql-sql > 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. You might also look at the earthdistance code in contrib if you'd rather have a C function. HTH, Joe Attachments: geodist.sql (application/octet-stream, 625B) download ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-10-08 15:33 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2001-10-08 12:58 Search by longitude/latitude Chris Ruprecht <chrup999@yahoo.com> 2001-10-08 13:42 ` James Orr <james@lrgmail.com> 2001-10-08 14:13 ` Colin 't Hart <cthart@yahoo.com> 2001-10-08 15:33 ` Joe Conway <joseph.conway@home.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox