Re: calculating distance between longitude and latitude

From: Uwe Schroeder <uwe(at)oss4u(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Geoffrey <lists(at)serioustechnology(dot)com>
Subject: Re: calculating distance between longitude and latitude
Date: 2010-06-10 02:39:42
Message-ID: 201006091939.42503.uwe@oss4u.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Does postgresql have functions to calculate the distance between two
> sets of longitude and latitude.
>

You're looking for the earthdistance contrib module. With most Linux distros
it's installed under /usr/share/postgresql/8.xx/contrib
You may have to install a "postgresql-contrib" package depending on your
distro.
Typing "locate earthdistance.sql" should reveal the location if it's available
already. To activate you'd just do a "pgsql [database] <
/whereever/earthdistance.sql"

HTH
Uwe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-06-10 03:11:43 Re: server crash => libpq poll() hangs forever (Linux)
Previous Message Lew 2010-06-10 00:18:51 Re: Cognitive dissonance