View Single Post
  #7 (permalink)  
Old July 14th, 2009, 10:48
LourensGlog LourensGlog is offline
Member and Blogger
 
Join Date: Oct 2007
Location: Netherlands
Posts: 209
Groans: 0
Groaned at 2 Times in 1 Post
Thanks: 18
Thanked 31 Times in 28 Posts
Rep Power: 3
LourensGlog is on a distinguished road
Send a message via AIM to LourensGlog Send a message via Yahoo to LourensGlog
Re: Has anyone worked on location based shipment search?

Assuming you have the long/lats for all your locations in OTM, and you don't mind if the 50 mi is a crow flight distance, then you can take the mathematical route using the Spherical Law of Cosines: d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(l ong2−long1)).R.
It may be difficult though to convert this formula to sql within the 801 characters limit OTM allows for Saved Queries, but it's worth a try.
Reply With Quote