Re: storing latitude and longitude

From: "Ivan Zolotukhin" <ivan(dot)zolotukhin(at)gmail(dot)com>
To: mark <markkicks(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: storing latitude and longitude
Date: 2008-07-11 07:59:26
Message-ID: 751e56400807110059h15e8f670r91563fe700a881b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Probably the simplest way is to use built-in point type and GiST index
over box(point, point). You will be able to make flat geometrical
calculations (e.g. distance with <-> operator) and retrieve data in
the box given with index support.

Regards,
Ivan

On Thu, Jul 10, 2008 at 9:25 PM, mark <markkicks(at)gmail(dot)com> wrote:
> hi..
> i want to store latitude and longitude in a users table.. what is the
> best data type to use for this? i want to be able to find use this
> info to find users within a distance..
> how do i go about doing this?
> thanks
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2008-07-11 08:24:05 Re: view row-level locks
Previous Message Martijn van Oosterhout 2008-07-11 07:47:04 Re: Top N within groups?