def _decdeg_distance(pt1, pt2):
lat1, lon1 = pt1<EOL>lat2, lon2 = pt2<EOL>lon1, lat1, lon2, lat2 = list(map(np.radians, [lon1, lat1, lon2, lat2]))<EOL>dlon = lon2 - lon1<EOL>dlat = lat2 - lat1<EOL>a = np.sin(dlat/<NUM_LIT:2>)**<NUM_LIT:2> + np.cos(lat1) * np.cos(lat2) * np.sin(dlon/<NUM_LIT:2>)**<NUM_LIT:2><EOL>c = <NUM_LIT:2> * np.arcsin(np.sqrt(a))<EOL>km = <NUM_LIT> * c<EOL>return km<EOL>
Earth surface distance (in km) between decimal latlong points using
Haversine approximation.

http://stackoverflow.com/questions/15736995/
how-can-i-quickly-estimate-the-distance-between-two-latitude-longitude-
points