'Location on Earth, initialized from geodetic coordinates.
Parameters
lon : `~astropy.coordinates.Longitude` or float
Earth East longitude.  Can be anything that initialises an
`~astropy.coordinates.Angle` object (if float, in degrees).
lat : `~astropy.coordinates.Latitude` or float
Earth latitude.  Can be anything that initialises an
`~astropy.coordinates.Latitude` object (if float, in degrees).
height : `~astropy.units.Quantity` or float, optional
Height above reference ellipsoid (if float, in meters; default: 0).
ellipsoid : str, optional
Name of the reference ellipsoid to use (default: \'WGS84\').
Available ellipsoids are:  \'WGS84\', \'GRS80\', \'WGS72\'.
Raises
astropy.units.UnitsError
If the units on ``lon`` and ``lat`` are inconsistent with angular
ones, or that on ``height`` with a length.
ValueError
If ``lon``, ``lat``, and ``height`` do not have the same shape, or
if ``ellipsoid`` is not recognized as among the ones implemented.
Notes
For the conversion to geocentric coordinates, the ERFA routine
``gd2gc`` is used.  See https://github.com/liberfa/erfa'

@classmethod
def from_geodetic(cls, lon, lat, height=0.0, ellipsoid=None):

    ellipsoid = _check_ellipsoid(ellipsoid, default=cls._ellipsoid)
    lon = Longitude(lon, u.degree, wrap_angle=(180 * u.degree), copy=False)
    lat = Latitude(lat, u.degree, copy=False)
    if (not isinstance(height, u.Quantity)):
        height = u.Quantity(height, u.m, copy=False)
    (_lon, _lat, _height) = np.broadcast_arrays(lon.to_value(u.radian), lat.to_value(u.radian), height.to_value(u.m))
    xyz = erfa.gd2gc(getattr(erfa, ellipsoid), _lon.ravel(), _lat.ravel(), _height.ravel())
    self = xyz.view(cls._location_dtype, cls).reshape(_lon.shape)
    self._unit = u.meter
    self._ellipsoid = ellipsoid
    return self.to(height.unit)
