Re: Finding points within 50 miles

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Finding points within 50 miles
Date: 2005-06-27 15:29:49
Message-ID: 20050627152949.GC18785@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 26, 2005 at 16:40:03 -0700,
CSN <cool_screen_name90001(at)yahoo(dot)com> wrote:
> If I have a table of items with latitude and longitude
> coordinates, is it possible to find all other items
> that are within, say, 50 miles of an item, using the
> geometric functions
> (http://www.postgresql.org/docs/8.0/interactive/functions-geometry.html)?
> If so, how?

You could take a look at using the parts of the earthdistance contrib
module based on the cube data type. Gist indexes are supposed to make
this kind of query fast.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Catalin Constantin 2005-06-27 15:46:58 performance for insert / update
Previous Message Bruno Wolff III 2005-06-27 15:24:03 Re: Infix Function?