Re: distance calculation usng lat and long in miles

From: brew(at)theMode(dot)com
To: sunithab(at)travelpost(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: distance calculation usng lat and long in miles
Date: 2006-03-08 17:33:47
Message-ID: Pine.BSF.4.58.0603081224200.51568@themode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I am calculating the distance as below
>
> select distance(geom1, geom2)* 69.055
>
>
> It seems to be right. But I want to make sure.

One way to calculate is the Great Circle Distance, that's the way the FCC
(Federal Communications Commission) uses to calculate distance between two
Radio Stations, using the lat and long for each.

Read about it at:

http://www.fcc.gov/mb/audio/bickel/distance.html

And better still, check your calculations against their online calculator
on the page for 'Distance and Azimuths Between 2 Sets of Coordinates'.

I accounts for the curve of the earth, too. It may be more accurate than
you need, but it will be interesting to compare against, at any rate.

brew

==========================================================================
Strange Brew (brew(at)theMode(dot)com)
Check out my Stock Option Covered Call website http://www.callpix.com
and my Musician's Online Database Exchange http://www.TheMode.com
==========================================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Uwe C. Schroeder 2006-03-08 17:42:42 Re: distance calculation usng lat and long in miles
Previous Message sunithab 2006-03-08 17:15:37