Package pygeodesy :: Module ellipsoidalNvector :: Class LatLon |
[frames] | no frames]

# Class LatLon

                   object --+
                            |
                 named._Named --+
                                |
                 named._NamedBase --+
                                    |
                latlonBase.LatLonBase --+
                                        |
            nvectorBase.LatLonNvectorBase --+
                                            |
                   object --+               |
                            |               |
                 named._Named --+           |
                                |           |
                 named._NamedBase --+       |
                                    |       |
                latlonBase.LatLonBase --+   |
                                        |   |
    ellipsoidalBase.LatLonEllipsoidalBase --+
                                            |
                                           LatLon

An n-vector-based, ellipsoidal LatLon point.

Example:

    >>> from ellipsoidalNvector import LatLon
    >>> p = LatLon(52.205, 0.119)  # height=0, datum=Datums.WGS84

Instance Methods
deltaTo(self, other) Calculate the local delta from this to an other point. |
destinationNed(self, delta) Calculate the destination point using the supplied NED delta from this point. |
distanceTo(self, other, radius=None, wrap=False) Approximate the distance from this to an other point. |
equals(self, other, eps=None) DEPRECATED, use method isequalTo. |
isequalTo(self, other, eps=None) Compare this point with an other point. |
intermediateTo(self, other, fraction, height=None, **unused) Return the point at given fraction between this and an other point. |
toCartesian(self, **Cartesian_and_kwds) Convert this point to an `Nvector`-based geodetic point. |
toNvector(self, **Nvector_and_kwds) Convert this point to Nvector components, including height. |
Inherited from `nvectorBase.LatLonNvectorBase`: `intersections2`, `others`, `triangulate`, `trilaterate`, `trilaterate5` Inherited from `ellipsoidalBase.LatLonEllipsoidalBase`: `__init__`, `antipode`, `convertDatum`, `convertRefFrame`, `distanceTo2`, `elevation2`, `ellipsoid`, `ellipsoids`, `geoidHeight2`, `intersection3`, `nearestOn`, `parse`, `to3xyz`, `toCss`, `toDatum`, `toEtm`, `toLcc`, `toMgrs`, `toOsgr`, `toRefFrame`, `toUps`, `toUtm`, `toUtmUps`, `toWm` Inherited from `latlonBase.LatLonBase`: `PointsIter`, `__eq__`, `__ne__`, `__str__`, `_distanceTo_`, `bounds`, `boundsOf`, `chordTo`, `circin6`, `circum3`, `circum4_`, `compassAngle`, `compassAngleTo`, `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `destinationXyz`, `equals3`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`, `flatPolarTo`, `hartzell`, `haversineTo`, `height4`, `heightStr`, `hubenyTo`, `isantipode`, `isantipodeTo`, `isequalTo3`, `latlon2`, `latlon2round`, `latlon_`, `nearestOn6`, `philam2`, `points`, `points2`, `radii11`, `thomasTo`, `to2ab`, `to3llh`, `toEcef`, `toLocal`, `toLtp`, `toStr`, `toVector`, `toVector3d`, `vincentysTo` Inherited from `named._NamedBase`: `__repr__`, `toRepr` Inherited from `named._Named`: `_DOT_`, `attrs`, `classof`, `copy`, `dup`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| Ecef Get the ECEF class (EcefVeness), lazily.
Inherited from `ellipsoidalBase.LatLonEllipsoidalBase`: `Equidistant`, `convergence`, `datum`, `epoch`, `iteration`, `reframe`, `scale` Inherited from `latlonBase.LatLonBase`: `height`, `isEllipsoidal`, `isSpherical`, `lam`, `lat`, `latlon`, `latlonheight`, `lon`, `phi`, `philam`, `philamheight`, `xyz`, `xyzh` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### deltaTo (self, other) |
Calculate the local delta from this to an other point. The delta is returned as a North-East-Down (NED) vector. Note, this is a linear delta, unrelated to a geodesic on the ellipsoid. The points need not be defined on the same datum. Arguments: `other` - The other point (LatLon). Returns: Delta of this point (Ned). Raises: `TypeError` - The `other` point is not LatLon. `ValueError` - If ellipsoids are incompatible. Example:
    >>> a = LatLon(49.66618, 3.45063)
    >>> b = LatLon(48.88667, 2.37472)
    >>> delta = a.deltaTo(b)  # [N:-86126, E:-78900, D:1069]
    >>> d = delta.length  # 116807.681 m
    >>> b = delta.bearing  # 222.493°
    >>> e = delta.elevation  # -0.5245°

### destinationNed (self, delta) |
Calculate the destination point using the supplied NED delta from this point. Arguments: `delta` - Delta from this to the other point in the local tangent plane (LTP) of this point (Ned). Returns: Destination point (LatLon). Raises: `TypeError` - If `delta` is not Ned. Example:
    >>> a = LatLon(49.66618, 3.45063)
    >>> delta = Ned(-86126, -78900, 1069)  # from Aer(222.493, -0.5245, 116807.681)
    >>> b = a.destinationNed(delta)  # 48.886669°N, 002.374721°E or 48°53′12.01″N, 002°22′29.0″E   +0.20m
JS name: destinationPoint.

### distanceTo (self, other, radius=None, wrap=False) |
Approximate the distance from this to an other point. Arguments: `other` - The other point (LatLon). `radius` - Mean earth radius, ellipsoid or datum (`meter`, Ellipsoid, Ellipsoid2, Datum or a_f2Tuple), overriding the mean radius `R1` of this point's datum.. `wrap` - Wrap/unroll the angular distance (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not LatLon. `ValueError` - Invalid `radius`. Example:
    >>> p = LatLon(52.205, 0.119)
    >>> q = LatLon(48.857, 2.351);
    >>> d = p.distanceTo(q)  # 404300

### equals (self, other, eps=None) |
DEPRECATED, use method isequalTo. Decorators: `@deprecated_method` Overrides: latlonBase.LatLonBase.equals

### isequalTo (self, other, eps=None) |
Compare this point with an other point. Arguments: `other` - The other point (LatLon). `eps` - Optional margin (`float`). Returns: `True` if points are identical, including datum, ignoring height, `False` otherwise. Raises: `TypeError` - The `other` point is not LatLon. `ValueError` - Invalid `eps`. Overrides: latlonBase.LatLonBase.isequalTo See Also: Method `isequalTo3` to include height. Example:
    >>> p = LatLon(52.205, 0.119)
    >>> q = LatLon(52.205, 0.119)
    >>> e = p.isequalTo(q)  # True

### intermediateTo (self, other, fraction, height=None, **unused) |
Return the point at given fraction between this and an other point. Arguments: `other` - The other point (LatLon). `fraction` - Fraction between both points (`scalar`, 0.0 at this to 1.0 at the other point. `height` - Optional height, overriding the fractional height (`meter`). Returns: Intermediate point (LatLon). Raises: `TypeError` - The `other` point is not LatLon. Example:
    >>> p = LatLon(52.205, 0.119)
    >>> q = LatLon(48.857, 2.351)
    >>> p = p.intermediateTo(q, 0.25)  # 51.3721°N, 000.7073°E
JS name: intermediatePointTo.

### toCartesian (self, **Cartesian_and_kwds) |
Convert this point to an `Nvector`-based geodetic point. Arguments: `Cartesian_and_kwds` - Optional Cartesian, `datum` and other keyword arguments. Use `Cartesian=...` to override this Cartesian class or specify `Cartesian is None`. Returns: The geodetic point (Cartesian) or if `Cartesian` is set to `None`, an Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with `C` and `M` if available. Raises: `TypeError` - Invalid `Cartesian` or other `Cartesian_and_kwds`. Overrides: latlonBase.LatLonBase.toCartesian

### toNvector (self, **Nvector_and_kwds) |
Convert this point to Nvector components, including height. Arguments: `Nvector_and_kwds` - Optional Nvector, `datum` and other keyword arguments. Use `Nvector=...` to override this Nvector class or specify `Nvector is None`. Returns: The `n-vector` components (Nvector) or if `Nvector` is set to `None`, a Vector4Tuple`(x, y, z, h)`. Raises: `TypeError` - Invalid `Nvector` or other `Nvector_and_kwds`. Overrides: latlonBase.LatLonBase.toNvector Example:
    >>> p = LatLon(45, 45)
    >>> n = p.toNvector()
    >>> n.toStr()  # [0.50, 0.50, 0.70710]

Property Details

### Ecef Get the ECEF class (EcefVeness), lazily. Get method: Ecef(self) - Get the ECEF class (EcefVeness), lazily. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.