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__`, `bounds`, `boundsOf`, `compassAngle`, `compassAngleTo`, `equals`, `equals3`, `equirectangularTo`, `euclideanTo`, `haversineTo`, `isantipode`, `isantipodeTo`, `isequalTo`, `isequalTo3`, `latlon2`, `latlon2round`, `latlon_`, `philam2`, `points`, `points2`, `to2ab`, `to3llh`, `toCartesian`, `toEcef`, `toNvector`, `toStr`, `toVector`, `toVector3d`, `vincentysTo` Inherited from `named._NamedBase`: `__repr__`, `others`, `toStr2` Inherited from `named._Named`: `classof`, `copy` 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 ot Ups.
| datum Get this point's datum (Datum).
| epoch Get this point's observed epoch (`float`) or `None`.
| isEllipsoidal Check whether this `LatLon` point is ellipsoidal (`bool`).
| isSpherical Check whether this `LatLon` point is spherical (`bool`).
| iteration Get the iteration number (`int` or `None` if not available/applicable).
| reframe Get this point's reference frame (RefFrame) or `None`.
| 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`, `lam`, `lat`, `latlon`, `latlonheight`, `lon`, `phi`, `philam`, `philamheight` 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. Parameters: `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. Parameters: `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. Parameters: `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. Parameters: `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. Parameters: `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. Parameters: `adjust` - Adjust the elevation for a `datum` other than `NAD83`. `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 for the `datum` used and the `NAV83` datum upon which 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. Parameters: `datum` - Default datum (Datum). Returns: The ellipsoid (Ellipsoid).

### ellipsoids(self, other) |
Check the type and ellipsoid of this and an other point's datum. Parameters: `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. Parameters: `adjust` - Adjust the geoid height for a `datum` other than `NAD83/NADV88`. `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 for the given `datum` and the `NAV83/NADV88` datum of the elevations.geoidHeight2. 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. Parameters: `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: `ValueError` - Invalid `strll`.

### to3xyz(self) |
DEPRECATED, use method `toEcef`. Returns: A Vector3Tuple`(x, y, z)`. Overrides: latlonBase.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. Parameters: `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. Parameters: `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 ot Ups. Get Method: convergence(self) - Get this point's UTM or UPS meridian convergence (`degrees`) or `None` if not converted from Utm ot Ups. Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### datum Get this point'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 Get this point's observed epoch (`float`) or `None`. 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.

### isEllipsoidal Check whether this `LatLon` point is ellipsoidal (`bool`). Get Method: isEllipsoidal(self) - Check whether this `LatLon` point is ellipsoidal (`bool`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### isSpherical Check whether this `LatLon` point is spherical (`bool`). Get Method: isSpherical(self) - Check whether this `LatLon` point is spherical (`bool`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### 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: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### reframe Get this point's reference frame (RefFrame) or `None`. 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: Read_Only(self, ignored) - Throws an `AttributeError`, always.