pysal.lib.cg.harcdist

pysal.lib.cg.harcdist(p0, p1, lonx=True, radius=6371.0)[source]

Alternative arc distance function, uses haversine formula

Parameters:
p0 : first point as a tuple in decimal degrees
p1 : second point as a tuple in decimal degrees
lonx : boolean to assess the order of the coordinates,

for lon,lat (default) = True, for lat,lon = False

radius : radius of the earth at the equator as a sphere

default: RADIUS_EARTH_KM (6371.0 km) options: RADIUS_EARTH_MILES (3959.0 miles)

None (for result in radians)

Returns:
d : distance in units specified, km, miles or radians (for None)