Обсуждение: storing latitude and longitude
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
Sorry I'm not of much help but... did you check the data types page? http://postgresql.mirrors-r-us.net/docs/8.2/interactive/datatype-geometric.html http://postgresql.mirrors-r-us.net/docs/8.2/interactive/datatype-numeric.html That mainly depends on how many digits you need to store, if that's not enough you can always use the NUMERIC data type or create your own... ---------------------------------------- > Date: Thu, 10 Jul 2008 10:25:19 -0700 > From: markkicks@gmail.com > To: pgsql-general@postgresql.org > Subject: [GENERAL] storing latitude and longitude > > 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@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general _________________________________________________________________ Juega y gana, tenemos 3 Xbox a la semana. http://club.prodigymsn.com/
Hi Mark, Look at Postgis, to do this properly. It adds full OGC spec support for managing spatial/querying spatial data within a Postgresdatabase. It is an option included with the Windows Postgres installer, but is generally extra packages under Linux. Cheers, Brent Wood >>> mark <markkicks@gmail.com> 07/11/08 5:34 AM >>> 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@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Top posting because of a challenged reader ... try <http://postgis.refractions.net/> for packages and documentation.
Greg Williamson
Senior DBA
DigitalGlobe Inc
-----Original Message-----
From: pgsql-general-owner@postgresql.org on behalf of Brent Wood
Sent: Thu 7/10/2008 3:16 PM
To: markkicks@gmail.com; pgsql-general@postgresql.org
Subject: Re: [GENERAL] storing latitude and longitude
Hi Mark,
Look at Postgis, to do this properly. It adds full OGC spec support for managing spatial/querying spatial data within a Postgres database.
It is an option included with the Windows Postgres installer, but is generally extra packages under Linux.
Cheers,
Brent Wood
>>> mark <markkicks@gmail.com> 07/11/08 5:34 AM >>>
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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/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@gmail.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@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general >