Re: Storing latitude and longitude

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Rodolfo J(dot) Paiz" <rpaiz(at)simpaticus(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Storing latitude and longitude
Date: 2005-02-04 13:59:49
Message-ID: 20050204135949.GB18206@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Feb 03, 2005 at 18:31:45 -0600,
"Rodolfo J. Paiz" <rpaiz(at)simpaticus(dot)com> wrote:
> Hi:
>
> One of my tables will store latitude and longitude information. I've
> checked and I cannot see a datatype for that (which is no surprise, and
> no loss). However, I can think of three ways to store the data:

The earthdistance contrib module has a domain defined over the base type
cube (and contrib module) that can be used to store points on the surface
of a 3D sphere. The coordinates are stored in double precision, which should
be good enough for your requirements/

It shouldn't be too hard to have your application convert from DMS to
fractional degrees on input and output.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Arthur van Dorp 2005-02-04 14:06:50 Re: Using a preprocessor for constants in SQL
Previous Message Frank Bax 2005-02-04 13:51:45 Re: Using a preprocessor for constants in SQL