Search Postgresql Archives

Re: distance calculation usng lat and long in miles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> 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@xxxxxxxxxxx)
  Check out my Stock Option Covered Call website  http://www.callpix.com
     and my Musician's Online Database Exchange http://www.TheMode.com
 ==========================================================================



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux