Package pygeodesy :: Module ellipsoidalBase :: Class LatLonEllipsoidalBase |
[frames] | no frames]

# Class LatLonEllipsoidalBase

       object --+
                |
     named._Named --+
                    |
     named._NamedBase --+
                        |
    latlonBase.LatLonBase --+
                            |
                           LatLonEllipsoidalBase

Known Subclasses:
  - ellipsoidalKarney.LatLon
  - , ellipsoidalNvector.LatLon
  - , ellipsoidalVincenty.LatLon

(INTERNAL) Base class for ellipsoidal `LatLon`s.

Instance Methods
__init__(self, lat, lon, height=0, datum=None, reframe=None, epoch=None, name=`'````'`) Create an ellipsoidal `LatLon` point frome the given lat-, longitude and height on the given datum and with the given reference frame and epoch. |
antipode(self, height=None) Return the antipode, the point diametrically opposite to this point. |
convertDatum(self, datum2) Convert this point to an other datum. |
convertRefFrame(self, reframe2) Convert this point to an other reference frame. |
distanceTo2(self, other) Approximate the distance and (initial) bearing between this and an other (ellipsoidal) point based on the radii of curvature. |
elevation2(self, adjust=True, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, timeout=2) Return elevation of this point for its or the given datum. |
ellipsoid(self, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`) Return the ellipsoid of this point's datum or the given datum. |
ellipsoids(self, other) Check the type and ellipsoid of this and an other point's datum. |
geoidHeight2(self, adjust=False, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, timeout=2) Return geoid height of this point for its or the given datum. |
parse(self, strll, height=0, datum=None, sep=`'``,``'`) Parse a string representing this `LatLon` point. |
to3xyz(self) DEPRECATED, use method `toEcef`. |
toEtm(self) Convert this `LatLon` point to an ETM coordinate. |
toLcc(self) Convert this `LatLon` point to a Lambert location. |
toOsgr(self) Convert this `LatLon` point to an OSGR coordinate. |
toUps(self, pole=`'``N``'`, falsed=True) Convert this `LatLon` point to a UPS coordinate. |
toUtm(self) Convert this `LatLon` point to a UTM coordinate. |
toUtmUps(self, pole=`'````'`) Convert this `LatLon` point to a UTM or UPS coordinate. |
toWm(self) Convert this `LatLon` point to a WM coordinate. |
Inherited from `latlonBase.LatLonBase`: `__eq__`, `__ne__`, `__str__`, `_distanceTo_`, `bounds`, `boundsOf`, `compassAngle`, `compassAngleTo`, `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `equals`, `equals3`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`, `flatPolarTo`, `haversineTo`, `hubenyTo`, `isantipode`, `isantipodeTo`, `isequalTo`, `isequalTo3`, `latlon2`, `latlon2round`, `latlon_`, `philam2`, `points`, `points2`, `thomasTo`, `to2ab`, `to3llh`, `toCartesian`, `toEcef`, `toNvector`, `toStr`, `toVector`, `toVector3d`, `vincentysTo` Inherited from `named._NamedBase`: `__repr__`, `others`, `toRepr` Inherited from `named._Named`: `_dot_`, `attrs`, `classof`, `copy`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| convergence Get this point's UTM or UPS meridian convergence (`degrees`) or `None` if not converted from Utm or Ups.
| datum Property to get and set this points's datum (Datum).
| epoch Property to get and set this point's observed epoch (`float`).
| iteration Get the iteration number (`int` or `None` if not available/applicable).
| reframe Property to get and set this point's reference frame (RefFrame).
| scale Get this point's UTM grid or UPS point scale factor (`float`) or `None` if not converted from Utm or Ups.
Inherited from `latlonBase.LatLonBase`: `Ecef`, `height`, `isEllipsoidal`, `isSpherical`, `lam`, `lat`, `latlon`, `latlonheight`, `lon`, `phi`, `philam`, `philamheight`, `xyz`, `xyzh` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__ (self, lat, lon, height=0, datum=None, reframe=None, epoch=None, name=`'````'`) (Constructor) |
Create an ellipsoidal `LatLon` point frome the given lat-, longitude and height on the given datum and with the given reference frame and epoch. Arguments: `lat` - Latitude (`degrees` or DMS `[N|S]`). `lon` - Longitude (`degrees` or DMS `str[E|W]`). `height` - Optional elevation (`meter`, the same units as the datum's half-axes). `datum` - Optional, ellipsoidal datum to use (Datum). `reframe` - Optional reference frame (RefFrame). `epoch` - Optional epoch to observe for `reframe` (`scalar`), a non-zero, fractional calendar year. `name` - Optional name (string). Returns: New instance (`LatLon`). Raises: `TypeError` - `datum` is not a datum, `reframe` is not a RefFrame or `epoch` is not `scalar` non-zero. Overrides: object.__init__ Example:
    >>> p = LatLon(51.4778, -0.0016)  # height=0, datum=Datums.WGS84

### antipode (self, height=None) |
Return the antipode, the point diametrically opposite to this point. Arguments: `height` - Optional height of the antipode, height of this point otherwise (`meter`). Returns: The antipodal point (`LatLon`). Overrides: latlonBase.LatLonBase.antipode

### convertDatum (self, datum2) |
Convert this point to an other datum. Arguments: `datum2` - Datum to convert to (Datum). Returns: The converted point (ellipsoidal `LatLon`). Raises: `TypeError` - The `datum2` is not a Datum. Example:
    >>> p = LatLon(51.4778, -0.0016)  # default Datums.WGS84
    >>> p.convertDatum(Datums.OSGB36)  # 51.477284°N, 000.00002°E

### convertRefFrame (self, reframe2) |
Convert this point to an other reference frame. Arguments: `reframe2` - Reference frame to convert to (RefFrame). Returns: The converted point (ellipsoidal `LatLon`) or this point if conversion is `nil`. Raises: `TRFError` - No `.reframe` or no conversion available from `.reframe` to `reframe2`. `TypeError` - The `reframe2` is not a RefFrame. Example:
    >>> p = LatLon(51.4778, -0.0016, reframe=RefFrames.ETRF2000)  # default Datums.WGS84
    >>> p.convertRefFrame(RefFrames.ITRF2014)  # 51.477803°N, 000.001597°W, +0.01m

### distanceTo2 (self, other) |
Approximate the distance and (initial) bearing between this and an other (ellipsoidal) point based on the radii of curvature. Suitable only for short distances up to a few hundred Km or Miles and only between non-near-polar points. Arguments: `other` - The other point (`LatLon`). Returns: An Distance2Tuple`(distance, initial)`. Raises: `TypeError` - The `other` point is not `LatLon`. `ValueError` - Incompatible datum ellipsoids. See Also: Method Ellipsoid.distance2 and Local, flat earth approximation.

### elevation2 (self, adjust=True, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, timeout=2) |
Return elevation of this point for its or the given datum. Arguments: `adjust` - Adjust the elevation for a `datum` other than `NAD83` (`bool`). `datum` - Optional datum (Datum). `timeout` - Optional query timeout (`seconds`). Returns: An Elevation2Tuple`(elevation, data_source)` or `(None, error)` in case of errors. Notes: The adjustment applied is the difference in geocentric earth radius between the `datum` and `NAV83` upon which the elevations.elevation2 is based. NED elevation is only available for locations within the Conterminous US (CONUS). See Also: Function elevations.elevation2 and method Ellipsoid.Rgeocentric for further details and possible `error`s.

### ellipsoid (self, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`) |
Return the ellipsoid of this point's datum or the given datum. Arguments: `datum` - Default datum (Datum). Returns: The ellipsoid (Ellipsoid).

### ellipsoids (self, other) |
Check the type and ellipsoid of this and an other point's datum. Arguments: `other` - The other point (`LatLon`). Returns: This point's datum ellipsoid (Ellipsoid). Raises: `TypeError` - The `other` point is not `LatLon`. `ValueError` - Incompatible datum ellipsoids.

### geoidHeight2 (self, adjust=False, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, timeout=2) |
Return geoid height of this point for its or the given datum. Arguments: `adjust` - Adjust the geoid height for a `datum` other than `NAD83/NADV88` (`bool`). `datum` - Optional datum (Datum). `timeout` - Optional query timeout (`seconds`). Returns: An GeoidHeight2Tuple`(height, model_name)` or `(None, error)` in case of errors. Notes: The adjustment applied is the difference in geocentric earth radius between the `datum` and `NAV83/NADV88` upon which the elevations.geoidHeight2 is based. The geoid height is only available for locations within the Conterminous US (CONUS). See Also: Function elevations.geoidHeight2 and method Ellipsoid.Rgeocentric for further details and possible `error`s.

### parse (self, strll, height=0, datum=None, sep=`'``,``'`) |
Parse a string representing this `LatLon` point. The lat- and longitude must be separated by a sep[arator] character. If height is present it must follow and be separated by another sep[arator]. Lat- and longitude may be swapped, provided at least one ends with the proper compass direction. For more details, see functions parse3llh and parseDMS in sub-module dms. Arguments: `strll` - Lat, lon [, height] (string). `height` - Optional, default height (`meter` or `None`). `datum` - Optional, default datum (Datum). `sep` - Optional separator (string). Returns: The point (LatLonEllipsoidalBase). Raises: `ParseError` - Invalid `strll`.

### to3xyz (self) |
DEPRECATED, use method `toEcef`. Returns: A Vector3Tuple`(x, y, z)`. Overrides: latlonBase.LatLonBase.to3xyz Note: Overloads `LatLonBase.to3xyz`

### toEtm (self) |
Convert this `LatLon` point to an ETM coordinate. Returns: The ETM coordinate (Etm). See Also: Function toEtm8.

### toLcc (self) |
Convert this `LatLon` point to a Lambert location. Returns: The Lambert location (Lcc). See Also: Function toLcc in module lcc.

### toOsgr (self) |
Convert this `LatLon` point to an OSGR coordinate. Returns: The OSGR coordinate (Osgr). See Also: Function toOsgr in module osgr.

### toUps (self, pole=`'``N``'`, falsed=True) |
Convert this `LatLon` point to a UPS coordinate. Arguments: `pole` - Optional top/center of (stereographic) projection (`str`, 'N[orth]' or 'S[outh]'). `falsed` - False easting and northing (`bool`). Returns: The UPS coordinate (Ups). See Also: Function toUps8.

### toUtm (self) |
Convert this `LatLon` point to a UTM coordinate. Returns: The UTM coordinate (Utm). See Also: Function toUtm8.

### toUtmUps (self, pole=`'````'`) |
Convert this `LatLon` point to a UTM or UPS coordinate. Arguments: `pole` - Optional top/center of UPS (stereographic) projection (`str`, 'N[orth]' or 'S[outh]'). Returns: The UTM or UPS coordinate (Utm or Ups). Raises: `TypeError` - Result in Utm or Ups. See Also: Function toUtmUps.

### toWm (self) |
Convert this `LatLon` point to a WM coordinate. Returns: The WM coordinate (Wm). See Also: Function toWm in module webmercator.

Property Details

### convergence Get this point's UTM or UPS meridian convergence (`degrees`) or `None` if not converted from Utm or Ups. Get method: convergence(self) - Get this point's UTM or UPS meridian convergence (`degrees`) or `None` if not converted from Utm or Ups. Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### datum Property to get and set this points's datum (Datum). Get method: datum(self) - Get this point's datum (Datum). Set method: datum(self, datum) - Set this point's datum without conversion.

### epoch Property to get and set this point's observed epoch (`float`). Get method: epoch(self) - Get this point's observed epoch (`float`) or `None`. Set method: epoch(self, epoch) - Set or clear this point's observed epoch.

### iteration Get the iteration number (`int` or `None` if not available/applicable). Get method: iteration(self) - Get the iteration number (`int` or `None` if not available/applicable). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### reframe Property to get and set this point's reference frame (RefFrame). Get method: reframe(self) - Get this point's reference frame (RefFrame) or `None`. Set method: reframe(self, reframe) - Set or clear this point's reference frame.

### scale Get this point's UTM grid or UPS point scale factor (`float`) or `None` if not converted from Utm or Ups. Get method: scale(self) - Get this point's UTM grid or UPS point scale factor (`float`) or `None` if not converted from Utm or Ups. Set method: immutable(inst, value) - Throws an `AttributeError`, always.