# libpysal.cg.arcdist

libpysal.cg.arcdist(pt0, pt1, radius=6371.0)

  Arc distance between two points on a sphere.

  Parameters:
    pt0 `python:tuple`

      A point assumed to be in form (longitude,latitude).

    pt1 `python:tuple`

      A point assumed to be in form (longitude,latitude).

    radius `python:float`

      The radius of a sphere. Default is Earth’s radius in kilometers, `RADIUS_EARTH_KM` (`6371.0`). Earth’s radius in miles, `RADIUS_EARTH_MILES` (`3958.76`) is also an option. Source: http://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html

  Returns:
    dist `python:float`

      The arc distance between `pt0` and `pt1` using supplied `radius`.

  Examples

      >>> pt0 = (0, 0)
      >>> pt1 = (180, 0)
      >>> d = arcdist(pt0, pt1, RADIUS_EARTH_MILES)
      >>> d == math.pi * RADIUS_EARTH_MILES
      True