# libpysal.cg.geointerpolate

libpysal.cg.geointerpolate(p0, p1, t, lonx=True)

  Finds a point on a sphere along the great circle distance between two points on a sphere also known as a way point in great circle navigation.

  Parameters:
    p0 `python:tuple`

      The first point decimal degrees.

    p1 `python:tuple`

      The second point decimal degrees.

    t `python:float`

      The proportion along great circle distance between `p0` and `p1` (e.g., \(\mathtt{t}=0.5\) would find the mid-point).

    lonx bool

      The method to assess the order of the coordinates. `True` for (lon,lat); `False` for (lat,lon). Default is `True`.

  Returns:
    newpx, newpy `python:tuple`

      The new point in decimal degrees of (lon-lat) by default or (lat-lon) if `lonx` is set to `False`.

  Examples

      >>> p0 = (-87.893517, 41.981417)
      >>> p1 = (-87.519295, 41.657498)
      >>> geointerpolate(p0, p1, 0.1)             # using lon-lat
      (-87.85592403438788, 41.949079912574796)

      >>> p3 = (41.981417, -87.893517)
      >>> p4 = (41.657498, -87.519295)
      >>> geointerpolate(p3, p4, 0.1, lonx=False) # using lat-lon
      (41.949079912574796, -87.85592403438788)