Skip to main content
`Ctrl`+`K`

# BaseGeodeticRepresentation

class astropy.coordinates.BaseGeodeticRepresentation(lon, lat=None, height=None, copy=True)

  Bases: `BaseRepresentation`

  Base class for geodetic representations.

  Subclasses need to set attributes `_equatorial_radius` and `_flattening` to quantities holding correct values (with units of length and dimensionless, respectively), or alternatively an `_ellipsoid` attribute to the relevant ERFA index (as passed in to `erfa.eform`). The geodetic latitude is defined by the angle between the vertical to the surface at a specific point of the spheroid and its projection onto the equatorial plane.

  Parameters:
    lon, lat astropy:angle-like

      The longitude and latitude of the point(s), in angular units. The latitude should be between -90 and 90 degrees, and the longitude will be wrapped to an angle between 0 and 360 degrees. These can also be instances of `Angle` and either `Longitude` not `Latitude`, depending on the parameter.

    height `Quantity` [:ref: ‘length’]

      The height to the point(s).

    copy bool, optional

      If `True` (default), arrays will be copied. If `False`, arrays will be references, though possibly broadcast to ensure matching shapes.

  Attributes Summary

  `attr_classes` |
  `name` | Name of the representation or differential.

  Methods Summary

  `from_cartesian`(cart) | Converts 3D rectangular cartesian coordinates (assumed geocentric) to geodetic coordinates.
  `to_cartesian`() | Converts geodetic coordinates to 3D rectangular (geocentric) cartesian coordinates.

  Attributes Documentation

  attr_classes = {'height': <class 'astropy.units.quantity.Quantity'>, 'lat': <class 'astropy.coordinates.angles.core.Latitude'>, 'lon': <class 'astropy.coordinates.angles.core.Longitude'>}
  name = 'basegeodetic'

    Name of the representation or differential.

    When a subclass is defined, by default, the name is the lower-cased name of the class with with any trailing ‘representation’ or ‘differential’ removed. (E.g., ‘spherical’ for `SphericalRepresentation` or `SphericalDifferential`.)

    This can be customized when defining a subclass by setting the class attribute.

  Methods Documentation

  classmethod from_cartesian(cart)

    Converts 3D rectangular cartesian coordinates (assumed geocentric) to geodetic coordinates.

  to_cartesian()

    Converts geodetic coordinates to 3D rectangular (geocentric) cartesian coordinates.