Looking For Geodetic Python Software

Cousin Stanley CousinStanley at HotMail.Com
Thu Jun 23 23:32:09 CEST 2005


| ....
| 1) Given the latitude/longitude of two locations, compute the distance
|    between them.
|
|   "Distance" in this case would be either the straight-line
|    flying distance, or the actual over-ground distance that accounts
|    for the earth's curvature.

   # ---------------------------------------------------------------

     NewsGroup .... alt.comp.freeware
     Date ......... 2003-12-28
     Posted_By .... GRL
     Reply_By ..... Sascha Wostmann

     the formula is as follows:

     D = ACos((Sin(LA1)*Sin(LA2)) + (Cos(LA1)*Cos(LA2)*Cos(LO1-LO2))) * r

     with:

     LA1 / LA2 = latitude position 1 / 2
     LO1 / LO2 = longitude 1 / 2
     r = radius of earth (~ 6371 km = ~3958,75 miles)
     D = distance between locations (in km or miles depending on r)

     Source: somewhere below http://geoclassphp.sourceforge.net

   # ----------------------------------------------------------------

   About 18 months ago I put together a couple of small Python programs
   to compute great circle distances from the above formula ....

      http://fastq.com/~sckitching/Python/gcircle.py
      [ 2.6 kb ]

      http://fastq.com/~sckitching/Python/gcircle_dms.py
      [ 3.4 kb ]

   The first prompts the user for Lat/Long in fixed point degrees.

   The second prompts the user of Lat/Long in degrees minutes seconds.

   I only checked a few distances known distances at the time,
   but they seemed to be OK ....


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----



More information about the Python-list mailing list