Example #1
0
determining the forward and back azimuths and distance given the
latitudes and longitudes of an initial and terminus point.
"""

__all__ = ["Geod", "pj_ellps", "geodesic_version_str"]

import math
from typing import Any, Dict, List, Optional, Tuple, Union

from pyproj._geod import Geod as _Geod
from pyproj._geod import geodesic_version_str
from pyproj.exceptions import GeodError
from pyproj.list import get_ellps_map
from pyproj.utils import _convertback, _copytobuffer

pj_ellps = get_ellps_map()


class Geod(_Geod):
    """
    performs forward and inverse geodetic, or Great Circle,
    computations.  The forward computation (using the 'fwd' method)
    involves determining latitude, longitude and back azimuth of a
    terminus point given the latitude and longitude of an initial
    point, plus azimuth and distance. The inverse computation (using
    the 'inv' method) involves determining the forward and back
    azimuths and distance given the latitudes and longitudes of an
    initial and terminus point.

    Attributes
    ----------
Example #2
0
def test_get_ellps_map():
    ellps_map = get_ellps_map()
    assert ellps_map["WGS84"]["description"] == "WGS 84"
    assert_almost_equal(ellps_map["WGS84"]["a"], 6378137.0, decimal=1)
    assert_almost_equal(ellps_map["WGS84"]["rf"], 298.257223563, decimal=1)