Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding within a defined radius?
Message
From
17/02/2006 12:51:28
 
 
To
17/02/2006 10:48:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01097067
Message ID:
01097123
Views:
16
This message has been marked as the solution to the initial question of the thread.
>If I have the latitude and longitude of areas by zip code, how can I find the list of all items that fall within an X mile radius?
SELECT ;
  Areas.Name ;
  FROM Areas ;
  WHERE RadiusFunc(Areas.Lat, Areas.Long, TestLat, TestLong) <= X ;
  ...
You can develop RadiusFunc from the formulae at http://www.mathforum.com/library/drmath/view/51711.html
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform