I've got a database of user posted latitude/longitude points and am attempting to group 'close' points together. 'Close' is relative, but for the time being it appears to ~500 ft.

In the beginning it appeared I possibly could just group by rows that have a similar latitude/longitude for that first 3 decimal places (roughly a 300x300 box, knowning that it changes while you escape from the equator).

However, that method appears to become quite missing. 'Closeness' can not be considerably diverse from the length each decimal place signifies. It does not consider that two locations might have different numbers within the 3rd (or any) decimal place, but nonetheless be inside the distance that place signifies (33.1239 and 33.1240).

I have also mulled within the situation where Point A, and Point C are generally 'close' to suggest B (although not one another) - whenever they be arranged together? If that's the case, what goes on when Point D is 'close' to suggest C (with no other points) - if it is arranged too. Certainly I must determine the preferred behavior, but exactly how would be either implemented?

Can anybody point me within the right direction regarding how you can do this and what different techniques/approaches may be used?

Personally i think a little like I am missing something apparent.

Presently the information is definitely an a MySQL database, use with a PHP application however, I am available to other storage techniques if they are a vital part in achieving this. here.

Maybe overkill, however it appears in my experience a clustering problem: distance measure determines the way the similarity of two elements is calculated. Should you prefer a less naive solution try Data Mining: Practical Machine Learning Tools and Techniques, and employ Weka or Orange