MySQL Forums
Forum List  »  GIS

Finding WGS-84 locations within a specfied distance of each other
Posted by: Lloyd Borrett
Date: October 08, 2011 04:03PM


I have a few MySQL databases with WGS-84 datum based Lat and Lon coordinates stored in them. I would like to be able to be able to query each database to find any points within 'x' metres of each other. This would make it easier to locate possible duplicate points.

I came across a MySQL function at to calculate the distance between two points using Vincenty Distance WGS-84 algorithm.

So the query would have to get each point, then calculate the distance from it to every other point, and select those less than or equal to the specified distance, and then do the same for every other point.

Would anyone out there be able to construct a MySQL query to achieve this based on the above distance function?

Then we'd be able to use phpMyAdmin to run the query and learn more about the points stored.

Best Regards, Lloyd Borrett.

Options: ReplyQuote

Written By
Finding WGS-84 locations within a specfied distance of each other
October 08, 2011 04:03PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.