开发者

Determining if a set of coordinates are within the same area

When I say coordinates I mean latitude and longitude coordinates of earth. I w开发者_开发技巧ant 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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜