Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ECCD6475DAD; Thu, 12 Sep 2002 13:46:35 -0400 (EDT) Received: from mail.perdue.net (12-216-72-93.client.mchsi.com [12.216.72.93]) by postgresql.org (Postfix) with ESMTP id 4BC9D475AE5; Thu, 12 Sep 2002 13:46:34 -0400 (EDT) Received: (from tperdue@localhost) by mail.perdue.net (8.11.2/8.11.2/Debian 8.11.2-1) id g8CHiQk27592; Thu, 12 Sep 2002 12:44:26 -0500 Date: Thu, 12 Sep 2002 12:44:26 -0500 From: Tim Perdue To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Latitude / Longitude Message-ID: <20020912124426.A27570@mail.perdue.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline User-Agent: Mutt/1.3.12i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/504 X-Sequence-Number: 30085 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Folks - I'm working on a global weather database for a client and have hit an issue which I'm sure has been solved before. Unfortunately, the site search doesn= 't pull up anything. Essentially, I've got two tables, one with city/county/lat/long and another with lat/long/weather data. None of the lat/longs in the two tables match up directly, so I can't do a simple join of the two tables. I need to join on closest proximity on the lat/long fields. Any suggestions? It seems to me this will be pretty expensive on CPU resour= ces unless there's a really elegant trick uncovered. Tim --=20 Founder - PHPBuilder.com / Geocrawler.com / SourceForge GPG Public Key: http://www.perdue.net/personal/pgp.php Perdue, Inc. / Immortal LLC 515-554-9520 --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9gNJ6LxmgedYDVWQRAiojAJ4utMa+hS5/+NoY2VtFIMNhPxSi3ACdEA+x lDOPnUcj815rtLTuLBHmWh0= =+u3u -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--