Page 1 of 1

Closest GPS coordinate to input

Posted: Fri Jan 07, 2011 7:28 am
by cairoDev
Hi everyone,

I have a mysql table with following structure

Table Point
=============
Point_ID int
Point_ltd float(8,6)
Point_lng float(8,6)

given a user's gps coordinates (x,y) how can i get the closest point from above table "maybe within 10 - 100 m" to the user's input? using either mysql query or even using php. I think mysql query would be more efficient, right...!

thank you:)

Re: Closest GPS coordinate to input

Posted: Fri Jan 07, 2011 10:10 am
by josh
mysql query. great circle algorithm. tons of open source implementations.

http://www.google.com/search?rlz=1C1CHO ... rcle+mysql