views:

64

answers:

3

When I say coordinates I mean latitude and longitude coordinates of earth. I want to determine if a set of coordinates are within the same area (my cutoff is 200 miles). I've been googling "cluster alorithm" but I'm uncertain which would work best for me.

Thanks

+1  A: 

http://www.movable-type.co.uk/scripts/latlong.html

Anton
I actually already have that formula, I can calculate the distance between any two points but how do I go about finding a "cluster?"
Dat
@Dat: Can you describe a sample case?
Anton
@Dat: To clarify, what do you deliver as input and what do you expect as output?
Anton
A: 

Enjoy: http://www.movable-type.co.uk/scripts/latlong.html

Formula used is:

d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(long2−long1)).R

In which d is the distance, R is earth's radius, and {(lat1;long1), (lat2;long2)} are the two coordinates.

ANeves
Thanks, but I know that formula alerady. I need to figure out if a set or points are within a cluster. There are some algorithms out there already (DBSCAN, OPTICS) but I was hoping for something like a library that someone already wrote, either paid or free.
Dat
I don't know of any such library as you're looking for... and I don't know of any way to ensure they're all within a 200 miles radius except by calculating the length of every edge that connects two points.
ANeves
+1  A: 

The IMSL C# library has k-means, DBSCAN, and other cluster analysis function. I already have a license so I'm going to use this library.

Dat
Good, then mark this as asnwer. :)
ANeves