Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Radius zip code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01096373
Message ID:
01096528
Vues:
17
If you have a data file "ziplnglat" that lists all the zips with their long and lat (purchased) and you know the lng and lat of a particular zip code and a radias, here is some sort-of code that retrieves the other zip codes with in the specified radias.
The ziplnglat table has three columns zipnumber, lat and lng
mtlat=request.form("slat")
mtlng=request.form("slng")
mrad=request.form("srad")
SELECT Ziplnglat.zipnumber 
FROM ziplnglat
WHERE 
((69.1*(lat-"&mtlat&"))**2+(69.1*(lng-"&mtlng&")*COS(DTOR("&mtlat&")))**2)**0.5 < "&mrad&")
Paul Emery
theoakgrove@lansing.com
the Oakgrove Computer Group, Inc.
Grand Rapids, Michigan, USA
1-616-456-7133
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform