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

# Class LatLonEllipsoidalBase

        object --+
                 |
      bases._Named --+
                     |
          bases._Based --+
                         |
    bases.LatLonHeightBase --+
                             |
                            LatLonEllipsoidalBase

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

(INTERNAL) Base class for ellipsoidal `LatLon`.

Instance Methods
__init__(self, lat, lon, height=0, datum=None, name=`'````'`) Create an (ellipsoidal) `LatLon` point frome the given lat-, longitude and height on the given datum. |
antipode(self, height=None) Return the antipode, the point diametrically opposite to this point. |
convertDatum(self, datum) Convert this `LatLon` point to a new datum. |
distanceTo2(self, other) Approximate the distance and 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) Convert this (ellipsoidal) geodetic `LatLon` point to (geocentric) cartesian x/y/z components. |
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 `bases.LatLonHeightBase`: `__eq__`, `__ne__`, `__str__`, `bounds`, `boundsOf`, `compassAngle`, `compassAngleTo`, `copy`, `equals`, `equals3`, `equirectangularTo`, `haversineTo`, `isantipode`, `isantipodeTo`, `isequalTo`, `isequalTo3`, `latlon2`, `latlon2round`, `latlon_`, `points`, `points2`, `to2ab`, `to3llh`, `toStr` Inherited from `bases._Based`: `__repr__`, `classof`, `others`, `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 ot Ups.
| datum Get this point's datum (Datum).
| isEllipsoidal Check whether this `LatLon` point is ellipsoidal (`bool`).
| isSpherical Check whether this `LatLon` point is spherical (`bool`).
| scale Get this point's UTM grid or UPS point scale factor (`float`) or `None` if not converted from Utm or Ups.
Inherited from `bases.LatLonHeightBase`: `height`, `lat`, `latlon`, `lon` Inherited from `bases._Named`: `classname`, `classnaming`, `name` Inherited from `object`: `__class__`

Method Details

### __init__(self, lat, lon, height=0, datum=None, name=`'````'`) (Constructor) |
Create an (ellipsoidal) `LatLon` point frome the given lat-, longitude and height on the given datum. 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 datum to use (Datum). `name` - Optional name (string). Returns: New instance (`LatLon`). Raises: `RangeError` - Value of lat or lon outside the valid range and rangerrrors set to `True`. `ValueError` - Invalid lat or lon. 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: bases.LatLonHeightBase.antipode

### convertDatum(self, datum) |
Convert this `LatLon` point to a new datum. Parameters: `datum` - Datum to convert to (Datum). Returns: The converted point (ellipsoidal `LatLon`). Example:
    >>> pWGS84 = LatLon(51.4778, -0.0016)  # default Datums.WGS84
    >>> pOSGB  = pWGS84.convertDatum(Datums.OSGB36)  # 51.477284°N, 000.00002°E

### distanceTo2(self, other) |
Approximate the distance and 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: 2-Tuple (distance, bearing) in (`meter`, `degrees360`). 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: 2-Tuple (elevation, data_source) in (`meter`, `str`) or in case of errors (`None`, <error>). 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 in the Conterminous US (CONUS). See Also: Function elevations.elevation2 and method Ellipsoid.Rgeocentric for further details.

### 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` - Optional 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: 2-Tuple (height, model_name) in (`meter`, `str`) or in case of errors (`None`, <error>). Notes: The adjustment applied is the difference in geocentric earth radius for the given datum and the `NAV83/NADV88` datum upon which elevations.geoidHeight2 is based. Ths geoid height is only available for locations in the Conterminous US (CONUS). See Also: Function elevations.geoidHeight2 and method Ellipsoid.Rgeocentric for further details.

### 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) |
Convert this (ellipsoidal) geodetic `LatLon` point to (geocentric) cartesian x/y/z components. Returns: 3-Tuple (x, y, z) in (`meter`). Overrides: bases.LatLonHeightBase.to3xyz

### 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.

### 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.

### 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.