Find top "n" nearby coordinates.

Posted by John Hamelink on Stack Overflow See other posts from Stack Overflow or by John Hamelink
Published on 2010-04-13T19:25:18Z Indexed on 2010/04/18 15:43 UTC
Read the original article Hit count: 310

Filed under:
|
|
|
|

I have a coordinate. I want to find the top "n" (n being a variable value) nearest coordinates out of several thousand rows stored on a MySQL database. I also want to be able to define maximum and minimum distances between the coordinate in question and the coordinates in the database.

How best am I to go about this? Would it be bonkers to use PHP as I understand the syntax much better than MySQL?

If I use a MySQL function, how do I move it between databases if I choose to switch servers? How is it stored?

Lastly, what is the most efficient method of getting through all these coordinates accurately - the coordinates are all relatively close to one another?

Thanks for your time,

John.

© Stack Overflow or respective owner

Related posts about zipcode

Related posts about gps