Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding within a defined radius?
Message
De
17/02/2006 12:51:28
 
 
À
17/02/2006 10:48:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01097067
Message ID:
01097123
Vues:
15
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform