Package pygeodesy :: Package rhumb :: Module bases :: Class RhumbLineBase |
[frames] | no frames]

# Class RhumbLineBase

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
        karney._CapsBase --+
                           |
                          RhumbLineBase

Known Subclasses:
  - ekx.RhumbLine
  - , aux_.RhumbLineAux
  - , _PseudoRhumbLine

(INTERNAL) Base class for `rhumb.aux_.RhumbLineAux` and `rhumb.ekx.RhumbLine`.

Instance Methods
ArcPosition(self, a12, outmask=384) Compute a point at a given angular distance on this rhumb line. |
Intersecant2(self, lat0, lon0, radius, napier=True, **tol_eps) Compute the intersection(s) of this rhumb line and a circle. |
Intersection(self, other, tol=1.4901161193847656e-08, **eps) Iteratively find the intersection of this and an other rhumb line. |
Inverse(self, lat2, lon2, wrap=False, **outmask) Return the rhumb angle, distance, azimuth, reverse azimuth, etc. |
NearestOn(self, lat0, lon0, **exact_eps_est_tol) DEPRECATED on 23.10.30, use method PlumbTo. |
PlumbTo(self, lat0, lon0, exact=None, eps=2.220446049250313e-16, est=None, tol=1.4901161193847656e-08) Compute the perpendicular intersection of this rumb line with a geodesic from the given point, in part transcoded from Karney's C++ rhumb-intercept. |
Position(self, s12, outmask=384) Compute a point at a given distance on this rhumb line. |
__del__(self) |
__init__(self, rhumb, lat1, lon1, azi12, caps=3968, name='') New `RhumbLine` or `RhumbLineAux`. |
degrees2m(self, angle) Convert an angular distance along this rhumb line to `meter`. |
distance2(self, lat, lon) DEPRECATED on 23.09.23, use method RhumbLineAux.Inverse or RhumbLine.Inverse. |
intersection2(self, other, **tol_eps) DEPRECATED on 23.10.10, use method Intersection. |
m2degrees(self, distance) Convert a distance along this rhumb line to an angular distance. |
nearestOn4(self, lat0, lon0, **exact_eps_est_tol) DEPRECATED on 23.10.10, use method PlumbTo. |
toStr(self, prec=6, sep=', ', **unused) Return this `RhumbLine` as string. |
Inherited from `karney._CapsBase`: `caps_` Inherited from `named._NamedBase`: `__repr__`, `__str__`, `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__`

Class Variables
Inherited from `karney._CapsBase`: `ALL`, `AREA`, `AZIMUTH`, `DISTANCE`, `DISTANCE_IN`, `EMPTY`, `GEODESICSCALE`, `LATITUDE`, `LINE_OFF`, `LONGITUDE`, `LONG_UNROLL`, `REDUCEDLENGTH`, `STANDARD`

Properties
| TMorder Get this rhumb line's Transverse Mercator order (`int`, 4, 5, 6, 7 or 8).
| azi12 Get this rhumb line's azimuth (compass `degrees`).
| azi12_sincos2 Get the sine and cosine of this rhumb line's azimuth (2-tuple `(sin, cos)`).
| datum Get this rhumb line's datum (Datum).
| ellipsoid Get this rhumb line's ellipsoid (Ellipsoid).
| exact Get this rhumb line's exact option (`bool`).
| isLoxodrome Is this rhumb line a meridional (`None`), a parallel (`False`) or a `True` loxodrome?
| lat1 Get this rhumb line's latitude (`degrees90`).
| latlon1 Get this rhumb line's lat- and longitude (LatLon2Tuple`(lat, lon)`).
| lon1 Get this rhumb line's longitude (`degrees180`).
| rhumb Get this rhumb line's rhumb (RhumbAux or Rhumb).
| xTM Get this rhumb line's Transverse Mercator projection (ExactTransverseMercator if exact and ellipsoidal, otherwise KTransverseMercator for `TMorder`).
Inherited from `karney._CapsBase`: `caps`, `debug` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### ArcPosition (self, a12, outmask=384) |
Compute a point at a given angular distance on this rhumb line. Arguments: `a12` - The angle along this rhumb line from its origin to the point (`degrees`), can be negative. `outmask` - Bit-or'ed combination of Caps values specifying the quantities to be returned. Returns: GDict with 4 to 8 items `azi12, a12, s12, S12, lat2, lon2, lat1, lon1` with latitude `lat2` and longitude `lon2` of the point in `degrees`, the rhumb distance `s12` in `meter` from the start point of and the area `S12` under this rhumb line in `meter` squared. Raises: `ImportError` - Package `numpy` not found or not installed, only required for RhumbLineAux area `S12` when `exact is True`. Note: If `a12` is large enough that the rhumb line crosses a pole, the longitude of the second point is indeterminate and `NAN` is returned for `lon2` and area `S12`. If the first point is a pole, the cosine of its latitude is taken to be `sqrt(EPS)`. This position is extremely close to the actual pole and allows the calculation to be carried out in finite terms.

### Intersecant2 (self, lat0, lon0, radius, napier=True, **tol_eps) |
Compute the intersection(s) of this rhumb line and a circle. Arguments: `lat0` - Latitude of the circle center (`degrees`). `lon0` - Longitude of the circle center (`degrees`). `radius` - Radius of the circle (`meter`, conventionally). `napier` - If `True`, apply Napier's spherical triangle instead of planar trigonometry (`bool`). `tol_eps` - Optional keyword arguments, see method method Intersection for further details. Returns: 2-Tuple `(P, Q)` with both intersections (representing a rhumb chord), each a GDict from method Intersection extended to 18 items by `lat3, lon3, azi03, a03, s03` with azimuth `azi03` of, distance `a03` in `degrees` and `s03` in `meter` along the rhumb line from the circle `lat0, lon0` to the chord center `lat3, lon3`. If this rhumb line is tangential to the circle, both points are the same GDict instance with distances `s02` and `s03` near-equal to the `radius`. Raises: `IntersectionError` - The circle and this rhumb line do not intersect. `UnitError` - Invalid `radius`.

### Intersection (self, other, tol=1.4901161193847656e-08, **eps) |
Iteratively find the intersection of this and an other rhumb line. Arguments: `other` - The other rhumb line (`RhumbLine`). `tol` - Tolerance for longitudinal convergence and parallel error (`degrees`). `eps` - Tolerance for pygeodesy.intersection3d3 (`EPS`). Returns: The intersection point, a Position-like GDict with 13 items `lat1, lon1, azi12, a12, s12, lat2, lon2, lat0, lon0, azi02, a02, s02, at` with the rhumb angle `a02` and rhumb distance `s02` between the start point `lat0, lon0` of the `other` rhumb line and the intersection `lat2, lon2`, the azimuth `azi02` of the `other` rhumb line and the angle `at` between both rhumb lines. See method Position for further details. Raises: `IntersectionError` - No convergence for this `tol` or no intersection for an other reason. See Also: Methods `distance2` and `PlumbTo` and function pygeodesy.intersection3d3. Note: Each iteration involves a round trip to this rhumb line's ExactTransverseMercator or KTransverseMercator projection and function pygeodesy.intersection3d3 in that domain.

### Inverse (self, lat2, lon2, wrap=False, **outmask) |
Return the rhumb angle, distance, azimuth, reverse azimuth, etc. of a rhumb line between the given point and this rhumb line's start point. Arguments: `lat2` - Latitude of the point (`degrees`). `lon2` - Longitude of the points (`degrees`). `wrap` - If `True`, wrap or normalize and unroll `lat2` and `lon2` (`bool`). Returns: GDict with 8 items `a12, s12, azi12, azi21, lat1, lon1, lat2, lon2`, the rhumb angle `a12` and rhumb distance `s12` between both points in `degrees` respectively `meter`, the rhumb line's azimuth `azi12` and reverse azimuth `azi21` both in compass `degrees` between `-180` and `+180`.

### NearestOn (self, lat0, lon0, **exact_eps_est_tol) |
DEPRECATED on 23.10.30, use method PlumbTo. Decorators: `@deprecated_method`

### PlumbTo (self, lat0, lon0, exact=None, eps=2.220446049250313e-16, est=None, tol=1.4901161193847656e-08) |
Compute the perpendicular intersection of this rumb line with a geodesic from the given point, in part transcoded from Karney's C++ rhumb-intercept. Arguments: `lat0` - Latitude of the point (`degrees`). `lon0` - Longitude of the point (`degrees`). `exact` - If `None`, use a rhumb line perpendicular to this rhumb line, otherwise use an exact `Geodesic...` from the given point perpendicular to this rhumb line (`bool` or `Geodesic...`), see method Ellipsoid.geodesic_. `eps` - Optional tolerance for pygeodesy.intersection3d3 (`EPS`), used only if `exact is None`. `est` - Optional, initial estimate for the distance `s12` of the intersection along this rhumb line (`meter`), used only if `exact is not None`. `tol` - Longitudinal convergence tolerance (`degrees`) or distance tolerance (C(meter)) when `exact is None`, respectively `not None`. Returns: The intersection point on this rhumb line, a GDict from method Intersection if `exact`=None. If `exact` is not `None`, a Position-like GDict of 13 items `azi12, a12, s12, lat2, lat1, lat0, lon2, lon1, lon0, azi0, a02, s02, at` with distance `a02` in `degrees` and `s02` in `meter` between the given point `lat0, lon0` and the intersection `lat2, lon2`, geodesic azimuth `azi0` at the given point and the (perpendicular) angle `at` between the geodesic and this rhumb line at the intersection. The geodesic azimuth at the intersection is `(at + azi12)`. See method Position for further details. Raises: `ImportError` - Karney's geographiclib package not found or not installed. `IntersectionError` - No convergence for this `eps` or no intersection for some other reason. See Also: Methods `distance2`, `Intersecant2` and `Intersection` and function pygeodesy.intersection3d3.

### Position (self, s12, outmask=384) |
Compute a point at a given distance on this rhumb line. Arguments: `s12` - The distance along this rhumb line from its origin to the point (`meters`), can be negative. `outmask` - Bit-or'ed combination of Caps values specifying the quantities to be returned. Returns: GDict with 4 to 8 items `azi12, a12, s12, S12, lat2, lat1, lon2, lon1` with latitude `lat2` and longitude `lon2` of the point in `degrees`, the rhumb angle `a12` in `degrees` from the start point of and the area `S12` under this rhumb line in `meter` squared. Raises: `ImportError` - Package `numpy` not found or not installed, only required for RhumbLineAux area `S12` when `exact is True`. Note: If `s12` is large enough that the rhumb line crosses a pole, the longitude of the second point is indeterminate and `NAN` is returned for `lon2` and area `S12`. If the first point is a pole, the cosine of its latitude is taken to be `sqrt(EPS)`. This position is extremely close to the actual pole and allows the calculation to be carried out in finite terms.

### __init__ (self, rhumb, lat1, lon1, azi12, caps=3968, name='') (Constructor) |
New `RhumbLine` or `RhumbLineAux`. Overrides: object.__init__

### degrees2m (self, angle) |
Convert an angular distance along this rhumb line to `meter`. Arguments: `angle` - Angular distance (`degrees`). Returns: Distance (`meter`).

### distance2 (self, lat, lon) |
DEPRECATED on 23.09.23, use method RhumbLineAux.Inverse or RhumbLine.Inverse. Returns: A Distance2Tuple`(distance, initial)` with the `distance` in `meter` and `initial` bearing (azimuth) in `degrees`. Decorators: `@deprecated_method`

### m2degrees (self, distance) |
Convert a distance along this rhumb line to an angular distance. Arguments: `distance` - Distance (`meter`). Returns: Angular distance (`degrees`).

### nearestOn4 (self, lat0, lon0, **exact_eps_est_tol) |
DEPRECATED on 23.10.10, use method PlumbTo. Decorators: `@deprecated_method`

### toStr (self, prec=6, sep=', ', **unused) |
Return this `RhumbLine` as string. Arguments: `prec` - The `float` precision, number of decimal digits (0..9). Trailing zero decimals are stripped for `prec` values of 1 and above, but kept for negative `prec` values. `sep` - Separator to join (`str`). Returns: `RhumbLine` (`str`). Overrides: named._Named.toStr

Property Details

### TMorder Get this rhumb line's Transverse Mercator order (`int`, 4, 5, 6, 7 or 8). Get method: TMorder(self) - Get this rhumb line's Transverse Mercator order (`int`, 4, 5, 6, 7 or 8). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### azi12 Get this rhumb line's azimuth (compass `degrees`). Get method: azi12(self) - Get this rhumb line's azimuth (compass `degrees`). Set method: azi12(self, azi12) - Set this rhumb line's azimuth (compass `degrees`). Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### azi12_sincos2 Get the sine and cosine of this rhumb line's azimuth (2-tuple `(sin, cos)`). Get method: azi12_sincos2(self) - Get the sine and cosine of this rhumb line's azimuth (2-tuple `(sin, cos)`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

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

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

### exact Get this rhumb line's exact option (`bool`). Get method: exact(self) - Get this rhumb line's exact option (`bool`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### isLoxodrome Is this rhumb line a meridional (`None`), a parallel (`False`) or a `True` loxodrome? Get method: isLoxodrome(self) - Is this rhumb line a meridional (`None`), a parallel (`False`) or a `True` loxodrome? Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value. See Also: Osborne's 2.5 Rumb lines and loxodromes, page 37.

### lat1 Get this rhumb line's latitude (`degrees90`). Get method: lat1(self) - Get this rhumb line's latitude (`degrees90`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### latlon1 Get this rhumb line's lat- and longitude (LatLon2Tuple`(lat, lon)`). Get method: latlon1(self) - Get this rhumb line's lat- and longitude (LatLon2Tuple`(lat, lon)`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### lon1 Get this rhumb line's longitude (`degrees180`). Get method: lon1(self) - Get this rhumb line's longitude (`degrees180`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### rhumb Get this rhumb line's rhumb (RhumbAux or Rhumb). Get method: rhumb(self) - Get this rhumb line's rhumb (RhumbAux or Rhumb). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### xTM Get this rhumb line's Transverse Mercator projection (ExactTransverseMercator if exact and ellipsoidal, otherwise KTransverseMercator for `TMorder`). Get method: xTM(self) - Get this rhumb line's Transverse Mercator projection (ExactTransverseMercator if exact and ellipsoidal, otherwise KTransverseMercator for `TMorder`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.