Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MATH - getting rows within a radius
Message
From
26/04/2007 08:30:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01219992
Message ID:
01220067
Views:
20
>>>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?
>>
>>GIYF: http://www.google.ca/search?q=lat+long+distance+between+points
>
>I didn't see anything about pulling records within a given radius....

The second link, http://www.movable-type.co.uk/scripts/LatLong.html has the formula to calculate the distance between two points. You would have to insert the lat. + long. for the desired center of the circle, and for each of the desired data points, and do the calculations, to know which are at a distance of less than the desired amount of km.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform