Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 17 May 2001 @ 11:10:03 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   SQL challenge
 
From:   Robert Doss

Hey,

Has anyone ever tried to calculate the Great Circle Distance (GCD) using SQL? GCD is the distance between to places.

GCD can be calculated using the lattitude and logitude of two places as follows:

GCD = 60 * arccos[ sin(Lat1)*sin(Lat2) +
cos(Lat1)*cos(Lat2)*cos(abs(Lon1-Lon2))]

I know 4. something will have trig functions - but if someone has worked it out without them, I would be most appreciative.


Thanks,

Bob Doss

Spirit Lake Consulting Pty. ltd.



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023