Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
>>> myell = ReferenceEllipsoid(
... name="TINY",
... semimajor_axis=1,
... inverse_flattening=1,
... geocentric_grav_const=10,
... angular_velocity=1,
... )
>>> with set_ellipsoid(myell):
... print(get_ellipsoid().name)
TINY
>>> print(get_ellipsoid().name)
WGS84
"""
if ellipsoid in KNOWN_ELLIPSOIDS:
ellipsoid = ReferenceEllipsoid(**KNOWN_ELLIPSOIDS[ellipsoid])
return EllipsoidManager(ellipsoid).set()
your own ellipsoid using :func:`harmonica.set_ellipsoid` and
:class:`harmonica.ReferenceEllipsoid`.
Any keyword arguments given to this function will be passed to
:func:`print`.
Examples
--------
>>> print_ellipsoids() # doctest: +ELLIPSIS
ReferenceEllipsoid(name='GRS80', ...)
ReferenceEllipsoid(name='WGS84', ...)
"""
for ellipsoid in sorted(KNOWN_ELLIPSOIDS):
print(ReferenceEllipsoid(**KNOWN_ELLIPSOIDS[ellipsoid]), **kwargs)