Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MATH - getting rows within a radius
Message
 
To
26/04/2007 13:32:03
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:
01220234
Views:
18
Thanks Al,

I'll give it a shot!

John

>>>>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....
>
>To expand on Hilmar's response you could do something like
>
>SELECT ;
>  ... ;
>  FROM Warrants ;
>  WHERE DistanceBetween( StationLat, StationLong, WarrantLat, WarrantLong ) <= SomeDistance ;
>  ...
>
>FUNCTION DistanceBetween( StationLat, StationLong, WarrantLat, WarrantLong )
>
>* Maths as per Google link(s)
>...
>
>RETURN Distance
>
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform