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

# Class LatLon

                   object --+
                            |
                 named._Named --+
                                |
                 named._NamedBase --+
                                    |
               bases.LatLonHeightBase --+
                                        |
                nvector.LatLonNvectorBase --+
                                            |
                   object --+               |
                            |               |
                 named._Named --+           |
                                |           |
                 named._NamedBase --+       |
                                    |       |
               bases.LatLonHeightBase --+   |
                                        |   |
    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
copy(self) Copy this point. |
deltaTo(self, other) Calculate the NED delta from this to an other point. |
destinationNed(self, delta) Calculate the destination point using the supplied NED delta from this 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) Return the point at given fraction between this and an other point. |
toCartesian(self) Convert this (geodetic) point to (geocentric x/y/z) cartesian coordinates. |
toNvector(self) Convert this point to an Nvector normal to the earth's surface. |
Inherited from `nvector.LatLonNvectorBase`: `others`, `to4xyzh` Inherited from `ellipsoidalBase.LatLonEllipsoidalBase`: `__init__`, `antipode`, `convertDatum`, `convertRefFrame`, `distanceTo2`, `elevation2`, `ellipsoid`, `ellipsoids`, `geoidHeight2`, `parse`, `to3xyz`, `toEtm`, `toLcc`, `toOsgr`, `toUps`, `toUtm`, `toUtmUps`, `toWm` Inherited from `bases.LatLonHeightBase`: `__eq__`, `__ne__`, `__str__`, `bounds`, `boundsOf`, `compassAngle`, `compassAngleTo`, `equals3`, `equirectangularTo`, `euclideanTo`, `haversineTo`, `isantipode`, `isantipodeTo`, `isequalTo3`, `latlon2`, `latlon2round`, `latlon_`, `philam2`, `points`, `points2`, `to2ab`, `to3llh`, `toStr`, `vincentysTo` Inherited from `named._NamedBase`: `__repr__`, `toStr2` Inherited from `named._Named`: `__copy__`, `classof` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `ellipsoidalBase.LatLonEllipsoidalBase`: `convergence`, `datum`, `epoch`, `isEllipsoidal`, `isSpherical`, `reframe`, `scale` Inherited from `bases.LatLonHeightBase`: `height`, `lat`, `latlon`, `latlonheight`, `lon`, `philam`, `philamheight` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### copy(self) |
Copy this point. Returns: The copy (LatLon or subclass thereof). Overrides: named._Named.copy

### deltaTo(self, other) |
Calculate the NED 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. Parameters: `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. Parameters: `delta` - Delta from this to the other point in the local tangent plane (LTP) of this point (Ned). Returns: Destination point (Cartesian). Raises: `TypeError` - If {delta} is not Ned. Example:
    >>> a = LatLon(49.66618, 3.45063)
    >>> delta = toNed(116807.681, 222.493, -0.5245)  # [N:-86126, E:-78900, D:1069]
    >>> b = a.destinationNed(delta)  # 48.88667°N, 002.37472°E
JS name: destinationPoint.

### equals(self, other, eps=None) |
DEPRECATED, use method `isequalTo`. Overrides: bases.LatLonHeightBase.equals

### isequalTo(self, other, eps=None) |
Compare this point with an other point. Parameters: `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. Overrides: bases.LatLonHeightBase.isequalTo See Also: Use 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) |
Return the point at given fraction between this and an other point. Parameters: `other` - The other point (LatLon). `fraction` - Fraction between both points ranging from 0 = this point to 1 = other point (`float`). `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) |
Convert this (geodetic) point to (geocentric x/y/z) cartesian coordinates. Returns: Cartesian instance (Cartesian x/y/z in meter from the earth center). Overrides: ellipsoidalBase.LatLonEllipsoidalBase.toCartesian

### toNvector(self) |
Convert this point to an Nvector normal to the earth's surface. Returns: N-vector representing this point (Nvector). Example:
    >>> p = LatLon(45, 45)
    >>> n = p.toNvector()
    >>> n.toStr()  # [0.50, 0.50, 0.70710]