Package pygeodesy :: Module latlonBase :: Class LatLonBase |
[frames] | no frames]

# Class LatLonBase

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

Known Subclasses:
  - nvectorBase.LatLonNvectorBase
  - , ellipsoidalBase.LatLonEllipsoidalBase
  - , sphericalBase.LatLonSphericalBase

(INTERNAL) Base class for `LatLon` points on spherical or ellipsoidal earth models.

Instance Methods
PointsIter(self, points, loop=0, dedup=False) Return a `PointsIter` iterator. |
__eq__(self, other) |
__init__(self, lat, lon, height=0, name='') New `LatLon`. |
__ne__(self, other) |
__str__(self) Default `str(self)`. |
_distanceTo_(self, func_, other, wrap=False) (INTERNAL) Helper for (ellipsoidal) methods `<func>To`. |
antipode(self, height=None) Return the antipode, the point diametrically opposite to this point. |
bounds(self, wide, tall, radius=6371008.77141) DEPRECATED, use method `boundsOf`. |
boundsOf(self, wide, tall, radius=6371008.77141, height=None) Return the SW and NE lat-/longitude of a great circle bounding box centered at this location. |
chordTo(self, other, height=None) Compute the length of the chord through the earth between this and an other point. |
circum3(self, point2, point3, circum=True, eps=8.881784197e-16) Return the radius and center of the smallest circle through or containing this and two other points. |
circum4_(self, *points) Best-fit a sphere through this and two or more other points. |
compassAngle(self, other, adjust=True, wrap=False) DEPRECATED, use method `compassAngleTo`. |
compassAngleTo(self, other, adjust=True, wrap=False) Return the angle from North for the direction vector between this and an other point. |
cosineAndoyerLambertTo(self, other, wrap=False) Compute the distance between this and an other point using the Andoyer-Lambert correction of the Law of Cosines formula. |
cosineForsytheAndoyerLambertTo(self, other, wrap=False) Compute the distance between this and an other point using the Forsythe-Andoyer-Lambert correction of the Law of Cosines formula. |
cosineLawTo(self, other, radius=None, wrap=False) Compute the distance between this and an other point using the spherical Law of Cosines formula. |
destinationXyz(self, delta, LatLon=None, **LatLon_kwds) Calculate the destination using a local delta from this point. |
equals(self, other, eps=None) DEPRECATED, use method isequalTo. |
equals3(self, other, eps=None) DEPRECATED, use method isequalTo3. |
equirectangularTo(self, other, radius=None, **options) Compute the distance between this and an other point using the Equirectangular Approximation / Projection. |
euclideanTo(self, other, radius=None, **options) Approximate the `Euclidian` distance between this and an other point. |
flatLocalTo(self, other, radius=None, wrap=False) Compute the distance between this and an other point using the ellipsoidal Earth to plane projection aka Hubeny formula. |
flatPolarTo(self, other, radius=None, wrap=False) Compute the distance between this and an other point using the polar coordinate flat-Earth formula. |
hartzell(self, los=None) Compute the intersection of a Line-Of-Sight from this Point-Of-View (pov) with this `datum`'s ellipsoid surface. |
haversineTo(self, other, radius=None, wrap=False) Compute the distance between this and an other point using the Haversine formula. |
height4(self, earth=None, normal=True, LatLon=None, **LatLon_kwds) Compute the height above or below and the projection on this datum's ellipsoid surface. |
heightStr(self, prec=-2, m=`'``m``'`) Return this `height` as `str`ing. |
hubenyTo(self, other, radius=None, wrap=False) Compute the distance between this and an other point using the ellipsoidal Earth to plane projection aka Hubeny formula. |
isantipode(self, other, eps=2.22044604925e-16) DEPRECATED, use method isantipodeTo. |
isantipodeTo(self, other, eps=2.22044604925e-16) Check whether this and an other point are antipodal, on diametrically opposite sides of the earth. |
isequalTo(self, other, eps=None) Compare this point with an other point, ignoring height. |
isequalTo3(self, other, eps=None) Compare this point with an other point, including height. |
latlon2(self, ndigits=0) Return this point's lat- and longitude in `degrees`, rounded. |
latlon2round(self, ndigits=0) DEPRECATED, use method latlon2. |
latlon_(self, ndigits=0) DEPRECATED, use method latlon2. |
philam2(self, ndigits=0) Return this point's lat- and longitude in `radians`, rounded. |
points(self, points, closed=True) DEPRECATED, use method points2. |
points2(self, points, closed=True) Check a path or polygon represented by points. |
thomasTo(self, other, wrap=False) Compute the distance between this and an other point using Thomas' formula. |
to2ab(self) DEPRECATED, use property philam. |
to3llh(self, height=None) DEPRECATED, use property latlonheight or `latlon.to3Tuple(height)`. |
to3xyz(self) DEPRECATED, use property xyz or method toNvector, toVector, toVector3d or perhaps (geocentric) toEcef. |
toCartesian(self, Cartesian=None, **Cartesian_kwds) Convert this point to cartesian, geocentric coordinates, also known as Earth-Centered, Earth-Fixed (ECEF). |
toEcef(self, height=None, M=False) Convert this point to geocentric coordinates, also known as Earth-Centered, Earth-Fixed (ECEF). |
toLocal(self, Xyz=None, ltp=None, **Xyz_kwds) Convert this geodetic point to local `X`, `Y` and `Z`. |
toLtp(self, Ecef=None) Return the local tangent plane (LTP) for this point. |
toNvector(self, h=None, Nvector=None, **Nvector_kwds) Convert this point to `n-vector` (normal to the earth's surface) components, including height. |
toStr(self, form=`'``dms``'`, prec=None, m=`'``m``'`, sep=', ') Convert this point to a "lat, lon [+/-height]" string, formatted in the given form. |
toVector(self, Vector=None, **Vector_kwds) Convert this point to `n-vector` (normal to the earth's surface) components, ignoring height. |
toVector3d(self) Convert this point to `n-vector` (normal to the earth's surface) components, ignoring height. |
vincentysTo(self, other, radius=None, wrap=False) Compute the distance between this and an other point using Vincenty's spherical formula. |
Inherited from `named._NamedBase`: `__repr__`, `others`, `toRepr` Inherited from `named._Named`: `_DOT_`, `attrs`, `classof`, `copy`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| Ecef Get the ECEF class (EcefKarney), lazily.
| datum (INTERNAL) Must be overloaded, see function `notOverloaded`.
| height Property to get and set the height (`meter`).
| isEllipsoidal Check whether this point is ellipsoidal (`bool` or `None` if unknown).
| isSpherical Check whether this point is spherical (`bool` or `None` if unknown).
| lam Get the longitude (`radians`).
| lat Property to get and set the latitude (`degrees90`).
| latlon Get the lat- and longitude (LatLon2Tuple`(lat, lon)`).
| latlonheight Get the lat-, longitude and height (LatLon3Tuple`(lat, lon, height)`).
| lon Property to get and set the longitude (`degrees180`).
| phi Get the latitude (`radians`).
| philam Get the lat- and longitude (PhiLam2Tuple`(phi, lam)`).
| philamheight Get the lat-, longitude in `radians` and height (PhiLam3Tuple`(phi, lam, height)`).
| xyz Get the `n-vector` X, Y and Z components (Vector3Tuple`(x, y, z)`)
| xyzh Get the `n-vector` X, Y, Z and H components (Vector4Tuple`(x, y, z, h)`)
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### PointsIter (self, points, loop=0, dedup=False) |
Return a `PointsIter` iterator. Arguments: `points` - The path or polygon points (`LatLon`[]) `loop` - Number of loop-back points (non-negative `int`). `dedup` - Skip duplicate points (`bool`). Returns: A new `PointsIter` iterator. Raises: `PointsError` - Insufficient number of `points`.

### __init__ (self, lat, lon, height=0, name='') (Constructor) |
New `LatLon`. Arguments: `lat` - Latitude (`degrees` or DMS `str` with N or S suffix). `lon` - Longitude (`degrees` or DMS `str` with E or W suffix). `height` - Optional height (`meter` above or below the earth surface). `name` - Optional name (`str`). Returns: New instance (`LatLon`). Raises: `RangeError` - Value of `lat` or `lon` outside the valid range and `rangerrors` set to `True`. `UnitError` - Invalid `lat`, `lon` or `height`. Overrides: object.__init__ Example:
    >>> p = LatLon(50.06632, -5.71475)
    >>> q = LatLon('50°03′59″N', """005°42'53"W""")

### __str__ (self) (Informal representation operator) |
Default `str(self)`. Overrides: object.__str__ (inherited documentation)

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

### bounds (self, wide, tall, radius=6371008.77141) |
DEPRECATED, use method `boundsOf`. Decorators: `@deprecated_method`

### boundsOf (self, wide, tall, radius=6371008.77141, height=None) |
Return the SW and NE lat-/longitude of a great circle bounding box centered at this location. Arguments: `wide` - Longitudinal box width (`meter`, same units as `radius` or `degrees` if `radius` is `None`). `tall` - Latitudinal box size (`meter`, same units as `radius` or `degrees` if `radius` is `None`). `radius` - Mean earth radius (`meter`). `height` - Height for `latlonSW` and `latlonNE` (`meter`), overriding the point's height. Returns: A Bounds2Tuple`(latlonSW, latlonNE)`, the lower-left and upper-right corner (`LatLon`). See Also: https://www.Movable-Type.co.UK/scripts/latlong-db.html

### chordTo (self, other, height=None) |
Compute the length of the chord through the earth between this and an other point. Arguments: `other` - The other point (`LatLon`). `height` - Overriding height for both points (`meter`) or `None` for each point's height. Returns: The chord length (conventionally `meter`). Raises: `TypeError` - The `other` point is not `LatLon`.

### circum3 (self, point2, point3, circum=True, eps=8.881784197e-16) |
Return the radius and center of the smallest circle through or containing this and two other points. Arguments: `point2` - Second point (`LatLon`). `point3` - Third point (`LatLon`). `circum` - If `True` return the `circumradius` and `circumcenter`, always, ignoring the Meeus' Type I case (`bool`). `eps` - Tolerance for function trilaterate3d2. Returns: A Circum3Tuple`(radius, center, deltas)`. The `center` is coplanar with all three points and `deltas` is either `None` or a LatLon3Tuple representing the `center` ambiguity. Raises: `ImportError` - Package `numpy` not found, not installed or older than version 1.15. `IntersectionError` - Near-concentric, coincident or colinear points, incompatible `Ecef` classes or a trilateration or `numpy` issue. `TypeError` - Invalid `point2` or `point3`. Note: The `center` is trilaterated in cartesian (ECEF) space and converted back to geodetic lat-, longitude and height. The latter, conventionally in `meter` indicates whether the `center` is above, below or on the surface of the earth model. If `deltas` is `None`, the `center` is unambigous. Otherwise `deltas` is a LatLon3Tuple`(lat, lon, height)` representing the difference between both trilaterate3d2 results and `center` is the mean thereof. See Also: Function pygeodesy.circum3 and method circum4_.

### circum4_ (self, *points) |
Best-fit a sphere through this and two or more other points. Arguments: `points` - The other points (each a `LatLon`). Returns: Circum4Tuple`(radius, center, rank, residuals)` with `center` an instance of this (sub-)class. Raises: `ImportError` - Package `numpy` not found, not installed or older than version 1.10. `NumPyError` - Some `numpy` issue. `TypeError` - One of the `points` invalid. `ValueError` - Too few `points`. See Also: Function pygeodesy.circum4_ and method circum3.

### compassAngle (self, other, adjust=True, wrap=False) |
DEPRECATED, use method `compassAngleTo`. Decorators: `@deprecated_method`

### compassAngleTo (self, other, adjust=True, wrap=False) |
Return the angle from North for the direction vector between this and an other point. Suitable only for short, non-near-polar vectors up to a few hundred Km or Miles. Use method `initialBearingTo` for larger distances. Arguments: `other` - The other point (`LatLon`). `adjust` - Adjust the longitudinal delta by the cosine of the mean latitude (`bool`). `wrap` - Wrap and unroll180 longitudes and longitudinal delta (`bool`). Returns: Compass angle from North (`degrees360`). Raises: `TypeError` - The `other` point is not `LatLon`. Note: Courtesy Martin Schultz. See Also: Local, flat earth approximation.

### cosineAndoyerLambertTo (self, other, wrap=False) |
Compute the distance between this and an other point using the Andoyer-Lambert correction of the Law of Cosines formula. Arguments: `other` - The other point (`LatLon`). `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as the axes of this point's datum ellipsoid). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function cosineAndoyerLambert and methods `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo`.

### cosineForsytheAndoyerLambertTo (self, other, wrap=False) |
Compute the distance between this and an other point using the Forsythe-Andoyer-Lambert correction of the Law of Cosines formula. Arguments: `other` - The other point (`LatLon`). `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as the axes of this point's datum ellipsoid). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function cosineForsytheAndoyerLambert and methods `cosineAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo`.

### cosineLawTo (self, other, radius=None, wrap=False) |
Compute the distance between this and an other point using the spherical Law of Cosines formula. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the mean radius of this point's datum ellipsoid. `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function cosineLaw and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo`.

### destinationXyz (self, delta, LatLon=None, **LatLon_kwds) |
Calculate the destination using a local delta from this point. Arguments: `delta` - Local delta to the destination (XyzLocal, Enu, Ned or Local9Tuple). `LatLon` - Optional (geodetic) class to return the destination or `None`. `LatLon_kwds` - Optional, additional `LatLon` keyword arguments, ignored is `LatLon is None`. Returns: Destination as a `LatLon(lat, lon, **LatLon_kwds)` instance or if `LatLon is None`, a LatLon3Tuple`(lat, lon, height)` respectively LatLon4Tuple`(lat, lon, height, datum)` depending on whether a `datum` keyword is un-/specified. Raises: `TypeError` - Invalid `delta`, `LatLon` or `LatLon_kwds`.

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

### equals3 (self, other, eps=None) |
DEPRECATED, use method isequalTo3. Decorators: `@deprecated_method`

### equirectangularTo (self, other, radius=None, **options) |
Compute the distance between this and an other point using the Equirectangular Approximation / Projection. Suitable only for short, non-near-polar distances up to a few hundred Km or Miles. Use method `haversineTo` or `distanceTo*` for more accurate and/or larger distances. See function equirectangular_ for more details, the available `options` and errors raised. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the mean radius of this point's datum ellipsoid. `options` - Optional keyword arguments for function equirectangular. Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function equirectangular and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo`.

### euclideanTo (self, other, radius=None, **options) |
Approximate the `Euclidian` distance between this and an other point. See function euclidean for the available `options`. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the mean radius of this point's datum ellipsoid. `options` - Optional keyword arguments for function euclidean. Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function euclidean and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo`.

### flatLocalTo (self, other, radius=None, wrap=False) |
Compute the distance between this and an other point using the ellipsoidal Earth to plane projection aka Hubeny formula. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the major radius of this point's datum/ellipsoid. `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. `ValueError` - Invalid `radius`. See Also: Function flatLocal/hubeny, methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo` and local, flat Earth approximation.

### flatPolarTo (self, other, radius=None, wrap=False) |
Compute the distance between this and an other point using the polar coordinate flat-Earth formula. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the mean radius of this point's datum ellipsoid. `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function flatPolar and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `haversineTo`, `thomasTo` and `vincentysTo`.

### hartzell (self, los=None) |
Compute the intersection of a Line-Of-Sight from this Point-Of-View (pov) with this `datum`'s ellipsoid surface. Arguments: `los` - Line-Of-Sight, direction to earth (Vector3d) or `None` to point to the ellipsoid's center. Returns: The ellipsoid intersection (`LatLon`) or this very instance if this `pov's height` is `0`. Raises: `IntersectionError` - Null `pov` or `los` vector, this `pov's height` is negative or `los` points outside the ellipsoid or in an opposite direction. `TypeError` - Invalid `los`. See Also: Function `hartzell` for further details.

### haversineTo (self, other, radius=None, wrap=False) |
Compute the distance between this and an other point using the Haversine formula. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the mean radius of this point's datum ellipsoid. `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function haversine and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `thomasTo` and `vincentysTo`.

### height4 (self, earth=None, normal=True, LatLon=None, **LatLon_kwds) |
Compute the height above or below and the projection on this datum's ellipsoid surface. Arguments: `earth` - A datum, ellipsoid or earth radius overriding this datum (Datum, Ellipsoid, Ellipsoid2, a_f2Tuple or `meter`, conventionally). `normal` - If `True` the projection is the nearest point on the ellipsoid's surface, otherwise the intersection of the radial line to the center and the ellipsoid's surface. `LatLon` - Optional class to return the height and projection (`LatLon`) or `None`. `LatLon_kwds` - Optional, additional `LatLon` keyword arguments, ignored if `LatLon is None`. Returns: An instance of `LatLon` or if `LatLon is None`, a Vector4Tuple`(x, y, z, h)` with the projection `x`, `y` and `z` coordinates and height `h` in `meter`, conventionally. Raises: `TypeError` - Invalid `earth`. Note: Use keyword argument `height=0` to override `LatLon.height` to {0} or any other `scalar`, conventionally in `meter`. See Also: Ellipsoid.height4 for more information.

### heightStr (self, prec=-2, m=`'``m``'`) |
Return this `height` as `str`ing. Arguments: `prec` - Optional number of decimals, unstripped (`int`). `m` - Optional unit of the height (`str`). See Also: Function hstr.

### hubenyTo (self, other, radius=None, wrap=False) |
Compute the distance between this and an other point using the ellipsoidal Earth to plane projection aka Hubeny formula. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the major radius of this point's datum/ellipsoid. `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. `ValueError` - Invalid `radius`. See Also: Function flatLocal/hubeny, methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatPolarTo`, `haversineTo`, `thomasTo` and `vincentysTo` and local, flat Earth approximation.

### isantipode (self, other, eps=2.22044604925e-16) |
DEPRECATED, use method isantipodeTo. Decorators: `@deprecated_method`

### isantipodeTo (self, other, eps=2.22044604925e-16) |
Check whether this and an other point are antipodal, on diametrically opposite sides of the earth. Arguments: `other` - The other point (`LatLon`). `eps` - Tolerance for near-equality (`degrees`). Returns: `True` if points are antipodal within the given tolerance, `False` otherwise.

### isequalTo (self, other, eps=None) |
Compare this point with an other point, ignoring height. Arguments: `other` - The other point (`LatLon`). `eps` - Tolerance for equality (`degrees`). Returns: `True` if both points are identical, ignoring height, `False` otherwise. Raises: `TypeError` - The `other` point is not `LatLon` or mismatch of the `other` and this `class` or `type`. `UnitError` - Invalid `eps`. See Also: Method isequalTo3. Example:
    >>> p = LatLon(52.205, 0.119)
    >>> q = LatLon(52.205, 0.119)
    >>> e = p.isequalTo(q)  # True

### isequalTo3 (self, other, eps=None) |
Compare this point with an other point, including height. Arguments: `other` - The other point (`LatLon`). `eps` - Tolerance for equality (`degrees`). Returns: `True` if both points are identical including height, `False` otherwise. Raises: `TypeError` - The `other` point is not `LatLon` or mismatch of the `other` and this `class` or `type`. See Also: Method isequalTo. Example:
    >>> p = LatLon(52.205, 0.119, 42)
    >>> q = LatLon(52.205, 0.119)
    >>> e = p.isequalTo3(q)  # False

### latlon2 (self, ndigits=0) |
Return this point's lat- and longitude in `degrees`, rounded. Arguments: `ndigits` - Number of decimal digits (`int`). Returns: A LatLon2Tuple`(lat, lon)`, both `float` and rounded away from zero. Note: The `round`ed values are always `float`, also if `ndigits` is omitted.

### latlon2round (self, ndigits=0) |
DEPRECATED, use method latlon2. Decorators: `@deprecated_method`

### latlon_ (self, ndigits=0) |
DEPRECATED, use method latlon2. Decorators: `@deprecated_method`

### philam2 (self, ndigits=0) |
Return this point's lat- and longitude in `radians`, rounded. Arguments: `ndigits` - Number of decimal digits (`int`). Returns: A PhiLam2Tuple`(phi, lam)`, both `float` and rounded away from zero. Note: The `round`ed values are always `float`, also if `ndigits` is omitted.

### points (self, points, closed=True) |
DEPRECATED, use method points2. Decorators: `@deprecated_method`

### points2 (self, points, closed=True) |
Check a path or polygon represented by points. Arguments: `points` - The path or polygon points (`LatLon`[]) `closed` - Optionally, consider the polygon closed, ignoring any duplicate or closing final `points` (`bool`). Returns: A Points2Tuple`(number, points)`, `int` and `list` or `tuple`. Raises: `PointsError` - Insufficient number of `points`. `TypeError` - Some `points` are not `LatLon`.

### thomasTo (self, other, wrap=False) |
Compute the distance between this and an other point using Thomas' formula. Arguments: `other` - The other point (`LatLon`). `wrap` - Wrap and unrollPI longitudes (`bool`). Returns: Distance (`meter`, same units as the axes of this point's datum ellipsoid). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function thomas and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo` and `vincentysTo`.

### to2ab (self) |
DEPRECATED, use property philam. Decorators: `@deprecated_method`

### to3llh (self, height=None) |
DEPRECATED, use property latlonheight or `latlon.to3Tuple(height)`. Decorators: `@deprecated_method`

### to3xyz (self) |
DEPRECATED, use property xyz or method toNvector, toVector, toVector3d or perhaps (geocentric) toEcef. Decorators: `@deprecated_method`

### toCartesian (self, Cartesian=None, **Cartesian_kwds) |
Convert this point to cartesian, geocentric coordinates, also known as Earth-Centered, Earth-Fixed (ECEF). Arguments: `Cartesian` - Optional class to return the geocentric coordinates (`Cartesian`) or `None`. `Cartesian_kwds` - Optional, additional `Cartesian` keyword arguments, ignored if `Cartesian is None`. Returns: A `Cartesian` or if `Cartesian` is `None`, an Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with `C=0` and `M` if available. Raises: `TypeError` - Invalid `Cartesian` or `Cartesian_kwds`.

### toEcef (self, height=None, M=False) |
Convert this point to geocentric coordinates, also known as Earth-Centered, Earth-Fixed (ECEF). Arguments: `height` - Optional height, overriding this point's height (`meter`). `M` - Optionally, include the rotation EcefMatrix (`bool`). Returns: An Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with `C=0` and `M` if available. Raises: `EcefError` - A `.datum` or an ECEF issue.

### toLocal (self, Xyz=None, ltp=None, **Xyz_kwds) |
Convert this geodetic point to local `X`, `Y` and `Z`. Arguments: `Xyz` - Optional class to return `X`, `Y` and `Z` (XyzLocal, Enu, Ned) or `None`. `ltp` - The local tangent plane (LTP) to use, overriding this point's LTP (Ltp). `Xyz_kwds` - Optional, additional `Xyz` keyword arguments, ignored if `Xyz is None`. Returns: An `Xyz` instance or if `Xyz is None`, a Local9Tuple`(x, y, z, lat, lon, height, ltp, ecef, M)` with `M=None`, always. Raises: `TypeError` - Invalid `ltp`.

### toLtp (self, Ecef=None) |
Return the local tangent plane (LTP) for this point. Arguments: `Ecef` - Optional ECEF class (EcefKarney, ... EcefYou), overriding this point's `Ecef`.

### toNvector (self, h=None, Nvector=None, **Nvector_kwds) |
Convert this point to `n-vector` (normal to the earth's surface) components, including height. Arguments: `h` - Optional height, overriding this point's height (`meter`). `Nvector` - Optional class to return the `n-vector` components (`Nvector`) or `None`. `Nvector_kwds` - Optional, additional `Nvector` keyword arguments, ignored if `Nvector is None`. Returns: A `Nvector` or an Vector4Tuple`(x, y, z, h)` if `Nvector` is `None`. Raises: `TypeError` - Invalid `Nvector` or `Nvector_kwds`.

### toStr (self, form=`'``dms``'`, prec=None, m=`'``m``'`, sep=', ') |
Convert this point to a "lat, lon [+/-height]" string, formatted in the given form. Arguments: `form` - Optional format, F_D, F_DM, F_DMS for deg°, deg°min′, deg°min′sec″ (`str`). `prec` - Optional number of decimal digits (0..8 or `None`). `m` - Optional unit of the height (`str`), use `None` to exclude height from the returned string. `sep` - Optional separator to join (`str`). Returns: Point in the specified form (`str`). Overrides: named._Named.toStr Example:
    >>> LatLon(51.4778, -0.0016).toStr()  # 51°28′40″N, 000°00′06″W
    >>> LatLon(51.4778, -0.0016).toStr(F_D)  # 51.4778°N, 000.0016°W
    >>> LatLon(51.4778, -0.0016, 42).toStr()  # 51°28′40″N, 000°00′06″W, +42.00m

### toVector (self, Vector=None, **Vector_kwds) |
Convert this point to `n-vector` (normal to the earth's surface) components, ignoring height. Arguments: `Vector` - Optional class to return the `n-vector` components (Vector3d) or `None`. `Vector_kwds` - Optional, additional `Vector` keyword arguments, ignored if `Vector is None`. Returns: A `Vector` or a Vector3Tuple`(x, y, z)` if `Vector` is `None`. Raises: `TypeError` - Invalid `Vector` or `kwds`. Note: These are `n-vector` x, y and z components, NOT geocentric (ECEF) x, y and z coordinates!

### toVector3d (self) |
Convert this point to `n-vector` (normal to the earth's surface) components, ignoring height. Returns: Unit vector (Vector3d). Note: These are `n-vector` x, y and z components, NOT geocentric (ECEF) x, y and z coordinates!

### vincentysTo (self, other, radius=None, wrap=False) |
Compute the distance between this and an other point using Vincenty's spherical formula. Arguments: `other` - The other point (`LatLon`). `radius` - Mean earth radius (`meter`) or `None` for the mean radius of this point's datum ellipsoid. `wrap` - Wrap and unroll180 longitudes (`bool`). Returns: Distance (`meter`, same units as `radius`). Raises: `TypeError` - The `other` point is not `LatLon`. See Also: Function vincentys and methods `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `distanceTo*`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`/`hubenyTo`, `flatPolarTo`, `haversineTo` and `thomasTo`.

Property Details

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

### datum (INTERNAL) Must be overloaded, see function `notOverloaded`. Get method: datum(self) - (INTERNAL) Must be overloaded, see function `notOverloaded`. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### height Property to get and set the height (`meter`). Get method: height(self) - Get the height (`meter`). Set method: height(self, height) - Set the height.

### isEllipsoidal Check whether this point is ellipsoidal (`bool` or `None` if unknown). Get method: isEllipsoidal(self) - Check whether this point is ellipsoidal (`bool` or `None` if unknown). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### isSpherical Check whether this point is spherical (`bool` or `None` if unknown). Get method: isSpherical(self) - Check whether this point is spherical (`bool` or `None` if unknown). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### lam Get the longitude (`radians`). Get method: lam(self) - Get the longitude (`radians`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### lat Property to get and set the latitude (`degrees90`). Get method: lat(self) - Get the latitude (`degrees90`). Set method: lat(self, lat) - Set the latitude.

### latlon Get the lat- and longitude (LatLon2Tuple`(lat, lon)`). Get method: latlon(self) - Get the lat- and longitude (LatLon2Tuple`(lat, lon)`). Set method: latlon(self, latlonh) - Set the lat- and longitude and optionally the height. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### latlonheight Get the lat-, longitude and height (LatLon3Tuple`(lat, lon, height)`). Get method: latlonheight(self) - Get the lat-, longitude and height (LatLon3Tuple`(lat, lon, height)`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### lon Property to get and set the longitude (`degrees180`). Get method: lon(self) - Get the longitude (`degrees180`). Set method: lon(self, lon) - Set the longitude.

### phi Get the latitude (`radians`). Get method: phi(self) - Get the latitude (`radians`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### philam Get the lat- and longitude (PhiLam2Tuple`(phi, lam)`). Get method: philam(self) - Get the lat- and longitude (PhiLam2Tuple`(phi, lam)`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### philamheight Get the lat-, longitude in `radians` and height (PhiLam3Tuple`(phi, lam, height)`). Get method: philamheight(self) - Get the lat-, longitude in `radians` and height (PhiLam3Tuple`(phi, lam, height)`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### xyz Get the `n-vector` X, Y and Z components (Vector3Tuple`(x, y, z)`) Get method: xyz(self) - Get the `n-vector` X, Y and Z components (Vector3Tuple`(x, y, z)`) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value. Note: These are `n-vector` x, y and z components, NOT geocentric (ECEF) x, y and z coordinates!

### xyzh Get the `n-vector` X, Y, Z and H components (Vector4Tuple`(x, y, z, h)`) Get method: xyzh(self) - Get the `n-vector` X, Y, Z and H components (Vector4Tuple`(x, y, z, h)`) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value. Note: These are `n-vector` x, y and z components, NOT geocentric (ECEF) x, y and z coordinates!