Package pygeodesy :: Module sphericalBase :: Class LatLonSphericalBase |
[frames] | no frames]

# Class LatLonSphericalBase

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

Known Subclasses:
  - sphericalNvector.LatLon
  - , sphericalTrigonometry.LatLon

(INTERNAL) Base class for spherical `LatLon`s.

Instance Methods
__init__(self, latlonh, lon=None, height=0, datum=None, wrap=False, name='') Create a spherical `LatLon` point frome the given lat-, longitude and height on the given datum. |
bearingTo2(self, other, wrap=False, raiser=False) Return the initial and final bearing (forward and reverse azimuth) from this to an other point. |
finalBearingTo(self, other, wrap=False, raiser=False) Return the final bearing (reverse azimuth) from this to an other point. |
intersecant2(self, circle, point, other, radius=6371008.771415, exact=False, height=None, wrap=False) Compute the intersections of a circle and a (great circle) line given as two points or as a point and bearing. |
maxLat(self, bearing) Return the maximum latitude reached when travelling on a great circle on given bearing from this point based on Clairaut's formula. |
minLat(self, bearing) Return the minimum latitude reached when travelling on a great circle on given bearing from this point. |
parse(self, strllh, height=0, sep=',', name='') Parse a string representing a similar, spherical `LatLon` point, consisting of `"lat, lon[, height]"`. |
rhumbAzimuthTo(self, other, radius=6371008.771415, exact=False, wrap=False, b360=False) Return the azimuth (bearing) of a rhumb line (loxodrome) between this and an other (spherical) point. |
rhumbBearingTo(self, other) DEPRECATED, use method `.rhumbAzimuthTo`. |
rhumbDestination(self, distance, azimuth, radius=6371008.771415, height=None, exact=False) Return the destination point having travelled the given distance from this point along a rhumb line (loxodrome) of the given azimuth. |
rhumbDistanceTo(self, other, radius=6371008.771415, exact=False, wrap=False) Return the distance from this to an other point along a rhumb line (loxodrome). |
rhumbIntersecant2(self, circle, point, other, radius=6371008.771415, exact=True, height=None, wrap=False) Compute the intersections of a circle and a rhumb line given as two points and as a point and azimuth. |
rhumbMidpointTo(self, other, height=None, radius=6371008.771415, exact=False, fraction=0.5, wrap=False) Return the (loxodromic) midpoint on the rhumb line between this and an other point. |
toNvector(self, Nvector=<class 'pygeodesy.nvectorBase.NvectorBase'>, **Nvector_kwds) Convert this point to `Nvector` components, including height. |
Inherited from `latlonBase.LatLonBase`: `PointsIter`, `__eq__`, `__ne__`, `__str__`, `antipode`, `bounds`, `boundsOf`, `chordTo`, `circin6`, `circum3`, `circum4_`, `compassAngle`, `compassAngleTo`, `cosineAndoyerLambertTo`, `cosineForsytheAndoyerLambertTo`, `cosineLawTo`, `destinationXyz`, `equals`, `equals3`, `equirectangularTo`, `euclideanTo`, `flatLocalTo`, `flatPolarTo`, `hartzell`, `haversineTo`, `height4`, `heightStr`, `hubenyTo`, `isantipode`, `isantipodeTo`, `isequalTo`, `isequalTo3`, `latlon2`, `latlon2round`, `latlon_`, `nearestOn6`, `nearestTo`, `normal`, `philam2`, `points`, `points2`, `radii11`, `rhumbLine`, `thomasTo`, `to2ab`, `to3llh`, `to3xyz`, `toCartesian`, `toDatum`, `toEcef`, `toLocal`, `toLtp`, `toNormal`, `toStr`, `toVector`, `toVector3d`, `toWm`, `vincentysTo` Inherited from `named._NamedBase`: `__repr__`, `others`, `toRepr` Inherited from `named._Named`: `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| datum Class `property` with retrievable name.
| napieradius Class `property` with retrievable name.
| sphericalLatLon Get this `LatLon`'s spherical class.
Inherited from `latlonBase.LatLonBase`: `Ecef`, `clipid`, `ellipsoidalLatLon`, `height`, `isEllipsoidal`, `isSpherical`, `isnormal`, `lam`, `lat`, `latlon`, `latlonheight`, `lon`, `phi`, `philam`, `philamheight`, `xyz`, `xyzh` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __init__ (self, latlonh, lon=None, height=0, datum=None, wrap=False, name='') (Constructor) |
Create a spherical `LatLon` point frome the given lat-, longitude and height on the given datum. Arguments: `latlonh` - Latitude (`degrees` or DMS `str` with N or S suffix) or a previous `LatLon` instance provided `lon=None`. `lon` - Longitude (`degrees` or DMS `str` with E or W suffix) or C(None), indicating `latlonh` is a `LatLon`. `height` - Optional height above (or below) the earth surface (`meter`, same units as the datum's ellipsoid axes or radius). `datum` - Optional, spherical datum to use (Datum, Ellipsoid, Ellipsoid2, a_f2Tuple) or earth radius in `meter`, conventionally). `wrap` - If `True`, wrap or normalize `lat` and `lon` (`bool`). `name` - Optional name (string). Returns: New instance (`LatLon`). Raises: `TypeError` - If `latlonh` is not a `LatLon` or `datum` not spherical. Overrides: object.__init__

### bearingTo2 (self, other, wrap=False, raiser=False) |
Return the initial and final bearing (forward and reverse azimuth) from this to an other point. Arguments: `other` - The other point (`LatLon`). `wrap` - If `True`, wrap or normalize and unroll the `other` point (`bool`). Returns: A Bearing2Tuple`(initial, final)`. Raises: `TypeError` - The `other` point is not spherical. See Also: Methods `initialBearingTo` and `finalBearingTo`.

### finalBearingTo (self, other, wrap=False, raiser=False) |
Return the final bearing (reverse azimuth) from this to an other point. Arguments: `other` - The other point (spherical `LatLon`). `wrap` - If `True`, wrap or normalize and unroll the `other` point (`bool`). Returns: Final bearing (compass `degrees360`). Raises: `TypeError` - The `other` point is not spherical.

### intersecant2 (self, circle, point, other, radius=6371008.771415, exact=False, height=None, wrap=False) |
Compute the intersections of a circle and a (great circle) line given as two points or as a point and bearing. Arguments: `circle` - Radius of the circle centered at this location (`meter`, same units as `radius`) or a point on the circle (this `LatLon`). `point` - A point on the (great circle) line (this `LatLon`). `other` - An other point on (this {LatLon}) or the bearing at `point` of the (great circle) line (compass `degrees`). `radius` - Mean earth radius (`meter`, conventionally). `exact` - If `True` use the exact rhumb methods for azimuth, destination and distance, if `False` use the basic rhumb methods (`bool`) or if `None` use the great circle methods. `height` - Optional height for the intersection points (`meter`, conventionally) or `None` for interpolated heights. `wrap` - If `True`, wrap or normalize and unroll the points `circle`, `point` and/or `other` (`bool`). Returns: 2-Tuple of the intersection points (representing a chord), each an instance of the `point` class. Both points are the same instance if the (great circle) line is tangent to the circle. Raises: `IntersectionError` - The circle and line do not intersect. `TypeError` - If `point` is not this `LatLon` or `circle` or `other` invalid. `UnitError` - Invalid `circle`, `other`, `radius`, `exact`, `height` or `napieradius`. Overrides: latlonBase.LatLonBase.intersecant2

### maxLat (self, bearing) |
Return the maximum latitude reached when travelling on a great circle on given bearing from this point based on Clairaut's formula. The maximum latitude is independent of longitude and the same for all points on a given latitude. Negate the result for the minimum latitude (on the Southern hemisphere). Arguments: `bearing` - Initial bearing (compass `degrees360`). Returns: Maximum latitude (`degrees90`). Raises: `ValueError` - Invalid `bearing`.

### minLat (self, bearing) |
Return the minimum latitude reached when travelling on a great circle on given bearing from this point. Arguments: `bearing` - Initial bearing (compass `degrees360`). Returns: Minimum latitude (`degrees90`). Raises: `ValueError` - Invalid `bearing`. See Also: Method maxLat for more details.

### parse (self, strllh, height=0, sep=',', name='') |
Parse a string representing a similar, spherical `LatLon` point, consisting of `"lat, lon[, height]"`. Arguments: `strllh` - Lat, lon and optional height (`str`), see function pygeodesy.parse3llh. `height` - Optional, default height (`meter`). `sep` - Optional separator (`str`). `name` - Optional instance name (`str`), overriding this name. Returns: The similar point (spherical `LatLon`). Raises: `ParseError` - Invalid `strllh`.

### rhumbAzimuthTo (self, other, radius=6371008.771415, exact=False, wrap=False, b360=False) |
Return the azimuth (bearing) of a rhumb line (loxodrome) between this and an other (spherical) point. Arguments: `other` - The other point (spherical `LatLon`). `radius` - Earth radius (`meter`) or earth model (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple). `exact` - If `True`, use Elliptic, Krüger Rhumb (`bool`), default `False` for backward compatibility. `wrap` - If `True`, wrap or normalize and unroll the `other` point (`bool`). `b360` - If `True`, return the azimuth in the bearing range. Returns: Rhumb azimuth (compass `degrees180` or `degrees360`). Raises: `TypeError` - The `other` point is incompatible or `radius` is invalid. Overrides: latlonBase.LatLonBase.rhumbAzimuthTo

### rhumbBearingTo (self, other) |
DEPRECATED, use method `.rhumbAzimuthTo`. Decorators: `@deprecated_method`

### rhumbDestination (self, distance, azimuth, radius=6371008.771415, height=None, exact=False) |
Return the destination point having travelled the given distance from this point along a rhumb line (loxodrome) of the given azimuth. Arguments: `distance` - Distance travelled (`meter`, same units as `radius`), may be negative if `exact=True`. `azimuth` - Azimuth (bearing) of the rhumb line (compass `degrees`). `radius` - Earth radius (`meter`) or earth model (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple) if `exact=True`. `height` - Optional height, overriding the default height (`meter`. `exact` - If `True`, use Elliptic, Krüger Rhumb (`bool`), default `False` for backward compatibility. Returns: The destination point (spherical `LatLon`). Raises: `ValueError` - Invalid `distance`, `azimuth`, `radius` or `height`. Overrides: latlonBase.LatLonBase.rhumbDestination

### rhumbDistanceTo (self, other, radius=6371008.771415, exact=False, wrap=False) |
Return the distance from this to an other point along a rhumb line (loxodrome). Arguments: `other` - The other point (spherical `LatLon`). `radius` - Earth radius (`meter`) or earth model (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple) if `exact=True`. `exact` - If `True`, use Elliptic, Krüger Rhumb (`bool`), default `False` for backward compatibility. `wrap` - If `True`, wrap or normalize and unroll the `other` point (`bool`). Returns: Distance (`meter`, the same units as `radius` or `radians` if `radius` is `None`). Raises: `TypeError` - The `other` point is incompatible. `ValueError` - Invalid `radius`. Overrides: latlonBase.LatLonBase.rhumbDistanceTo

### rhumbIntersecant2 (self, circle, point, other, radius=6371008.771415, exact=True, height=None, wrap=False) |
Compute the intersections of a circle and a rhumb line given as two points and as a point and azimuth. Arguments: `circle` - Radius of the circle centered at this location (`meter`, same units as `radius`) or a point on the circle (this `LatLon`). `point` - The rhumb line's start point (this `LatLon`). `other` - An other point (this on `LatLon`) or the azimuth of (compass `degrees`) the rhumb line. `radius` - Mean earth radius (`meter`, conventionally). `exact` - If `True` use the exact rhumb methods for azimuth, destination and distance, if `False` use the basic rhumb methods (`bool`) or if `None` use the great circle methods. `height` - Optional height for the intersection points (`meter`, conventionally) or `None`. `wrap` - If `True`, wrap or normalize and unroll the points `circle`, `point` and/or `other` (`bool`). Returns: 2-Tuple of the intersection points (representing a chord), each an instance of this class. For a tangent line, both points are the same instance, wrapped or normalized. Raises: `IntersectionError` - The circle and line do not intersect. `TypeError` - If `point` is not this `LatLon` or `circle` or `other` invalid. `UnitError` - Invalid `circle`, `other`, `radius`, `exact` or `height`. Overrides: latlonBase.LatLonBase.rhumbIntersecant2

### rhumbMidpointTo (self, other, height=None, radius=6371008.771415, exact=False, fraction=0.5, wrap=False) |
Return the (loxodromic) midpoint on the rhumb line between this and an other point. Arguments: `other` - The other point (spherical LatLon). `height` - Optional height, overriding the mean height (`meter`). `radius` - Earth radius (`meter`) or earth model (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple). `exact` - If `True`, use Elliptic, Krüger Rhumb (`bool`), default `False` for backward compatibility. `fraction` - Midpoint location from this point (`scalar`), may be negative if `exact=True`. `wrap` - If `True`, wrap or normalize and unroll the `other` point (`bool`). Returns: The (mid)point at the given `fraction` along the rhumb line (spherical `LatLon`). Raises: `TypeError` - The `other` point is incompatible. `ValueError` - Invalid `height` or `fraction` Overrides: latlonBase.LatLonBase.rhumbMidpointTo

### toNvector (self, Nvector=<class 'pygeodesy.nvectorBase.NvectorBase'>, **Nvector_kwds) |
Convert this point to `Nvector` components, including height. Arguments: `Nvector_kwds` - Optional, additional `Nvector` keyword arguments, ignored if `Nvector is None`. Returns: An `Nvector` or a Vector4Tuple`(x, y, z, h)` if `Nvector` is `None`. Raises: `TypeError` - Invalid `Nvector` or `Nvector_kwds`. Overrides: latlonBase.LatLonBase.toNvector

Property Details

### datum Class `property` with retrievable name. Get method: datum(self) - Get this point's datum (Datum). Set method: datum(self, datum) - Set this point's datum without conversion (Datum, Ellipsoid, Ellipsoid2, a_f2Tuple) or `scalar` spherical earth radius).

### napieradius Class `property` with retrievable name. Get method: napieradius(self) - Get the Napier radius (`meter`, conventionally). Set method: napieradius(self, radius) - Set this Napier radius (`meter`, conventionally) or `0`.

### sphericalLatLon Get this `LatLon`'s spherical class. Get method: sphericalLatLon(self) - Get this `LatLon`'s spherical class. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.