libpysal.cg.harcdist

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

Alternative arc distance function, uses haversine formula

Parameters
p0first point as a tuple in decimal degrees
p1second point as a tuple in decimal degrees
lonxboolean to assess the order of the coordinates,

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

radiusradius 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
ddistance in units specified, km, miles or radians (for None)