Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MATH - getting rows within a radius
Message
De
26/04/2007 12:08:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01219992
Message ID:
01220178
Vues:
19
>I have a table of warrants with latitude and longitude, and I would like to be able to select all warrants within a given radius. I know I've seen this discussed before. Any of you math professors got a clue?

The simplest (combining database and maths) would be to select those which fall into a square of the same size - i.e. which differ north/south and east/west by no more than a given radius - that should reduce the number of hits with a single simple SQL call. Then among those, exclude any where N/S distance squared plus E/W distance squared is larger than your radius squared. The remaining guys are in your radius.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform