Package pygeodesy :: Module rhumbx :: Class Rhumb |
[frames] | no frames]

# Class Rhumb

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
        karney._CapsBase --+
                           |
         rhumbBase.RhumbBase --+
                               |
                              Rhumb

Class to solve the direct and inverse rhumb problems, based on elliptic functions or Krüger series expansion.

See Also: The Detailed Description of Karney's C++ `Rhumb Class`.

Instance Methods
__init__(self, a_earth=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298.`...`, f=None, exact=True, name='', **RA_TMorder) New `rhumbx.Rhumb`. |
Direct(self, lat1, lon1, azi12, s12, outmask=384) Solve the direct rhumb problem, optionally with the area. |
Direct7(self, lat1, lon1, azi12, s12, outmask=16768) DEPRECATED, use method Rhumb.Direct8. |
Inverse(self, lat1, lon1, lat2, lon2, outmask=1536) Solve the inverse rhumb problem. |
Inverse7(self, lat1, lon1, azi12, s12, outmask=17920) DEPRECATED, use method Rhumb.Inverse8. |
orders(self, RAorder=None, TMorder=None) DEPRECATED, use properties `RAorder` and/or `TMorder`. |
toStr(self, prec=6, sep=', ', **unused) Return this `Rhumb` as string. |
Inherited from `rhumbBase.RhumbBase`: `Direct8`, `DirectLine`, `Inverse8`, `InverseLine`, `Line` 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
| RAorder Get the Rhumb Area order (`int`, 4, 5, 6, 7 or 8).
| TMorder Get the Transverse Mercator order (`int`, 4, 5, 6, 7 or 8).
Inherited from `rhumbBase.RhumbBase`: `a`, `b`, `ellipsoid`, `equatoradius`, `exact`, `f`, `f_max`, `flattening`, `polaradius` 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

### __init__ (self, a_earth=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298.`...`, f=None, exact=True, name='', **RA_TMorder) (Constructor) |
New `rhumbx.Rhumb`. Arguments: `a_earth` - This rhumb's earth model (Ellipsoid, Ellipsoid2, a_f2Tuple, Datum, 2-tuple `(a, f)`) or the (equatorial) radius (`scalar`). `f` - The ellipsoid's flattening (`scalar`), iff `a_earth` is a `scalar`, ignored otherwise. `exact` - If `True`, use an addition theorem for elliptic integrals to compute Divided differences, otherwise use the Krüger series expansion (`bool` or `None`), see also properties `exact` and `TMorder`. `name` - Optional name (`str`). `RA_TMorder` - Optional keyword arguments `RAorder` and `TMorder` to set the respective `order`, see properties `RAorder` and `TMorder` and method `orders`. Raises: `RhumbError` - Invalid `a_earth`, `f` or `RA_TMorder`. Overrides: object.__init__

### Direct (self, lat1, lon1, azi12, s12, outmask=384) |
Solve the direct rhumb problem, optionally with the area. Arguments: `lat1` - Latitude of the first point (`degrees90`). `lon1` - Longitude of the first point (`degrees180`). `azi12` - Azimuth of the rhumb line (compass `degrees`). `s12` - Distance along the rhumb line from the given to the destination point (`meter`), can be negative. Returns: GDict with 2 up to 8 items `lat2, lon2, a12, S12, lat1, lon1, azi12, s12` with the destination point's latitude `lat2` and longitude `lon2` in `degrees`, the rhumb angle `a12` in `degrees` and area `S12` under the rhumb line in `meter` squared. Overrides: rhumbBase.RhumbBase.Direct Notes: 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 given 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.

### Direct7 (self, lat1, lon1, azi12, s12, outmask=16768) |
DEPRECATED, use method Rhumb.Direct8. Returns: A DEPRECATED Rhumb7Tuple. Decorators: `@deprecated_method`

### Inverse (self, lat1, lon1, lat2, lon2, outmask=1536) |
Solve the inverse rhumb problem. Arguments: `lat1` - Latitude of the first point (`degrees90`). `lon1` - Longitude of the first point (`degrees180`). `lat2` - Latitude of the second point (`degrees90`). `lon2` - Longitude of the second point (`degrees180`). Returns: GDict with 5 to 8 items `azi12, s12, a12, S12, lat1, lon1, lat2, lon2`, the rhumb line's azimuth `azi12` in compass `degrees` between `-180` and `+180`, the distance `s12` and rhumb angle `a12` between both points in `meter` respectively `degrees` and the area `S12` under the rhumb line in `meter` squared. Overrides: rhumbBase.RhumbBase.Inverse Notes: The shortest rhumb line is found. If the end points are on opposite meridians, there are two shortest rhumb lines and the East-going one is chosen. If either 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.

### Inverse7 (self, lat1, lon1, azi12, s12, outmask=17920) |
DEPRECATED, use method Rhumb.Inverse8. Returns: A DEPRECATED Rhumb7Tuple. Decorators: `@deprecated_method`

### orders (self, RAorder=None, TMorder=None) |
DEPRECATED, use properties `RAorder` and/or `TMorder`. Get and set the RAorder and/or TMorder. Arguments: `RAorder` - Rhumb Area order (`int`, 4, 5, 6, 7 or 8). `TMorder` - Transverse Mercator order (`int`, 4, 5, 6, 7 or 8). Returns: RhumbOrder2Tuple`(RAorder, TMorder)` with the previous `RAorder` and `TMorder` setting. Decorators: `@deprecated_method`

### toStr (self, prec=6, sep=', ', **unused) |
Return this `Rhumb` 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: Tuple items (`str`). Overrides: named._Named.toStr

Property Details

### RAorder Get the Rhumb Area order (`int`, 4, 5, 6, 7 or 8). Get method: RAorder(self) - Get the Rhumb Area order (`int`, 4, 5, 6, 7 or 8). Set method: RAorder(self, order) - Set the Rhumb Area order (`int`, 4, 5, 6, 7 or 8). Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### TMorder Get the Transverse Mercator order (`int`, 4, 5, 6, 7 or 8). Get method: TMorder(self) - Get the Transverse Mercator order (`int`, 4, 5, 6, 7 or 8). Set method: TMorder(self, order) - Set the Transverse Mercator order (`int`, 4, 5, 6, 7 or 8). Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.