Package pygeodesy :: Module rhumbaux :: Class RhumbAux
[frames] | no frames]

Class RhumbAux

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

Class to solve the direct and inverse rhumb problems, based on Auxiliary Latitudes for accuracy near the poles.


Note: Package numpy must be installed, version 1.16 or later.

Instance Methods
 
__init__(self, a_earth=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298...., f=None, exact=True, name='', **TMorder)
New rhumbaux.RhumbAux.
 
areaux(self, **exact)
Get this ellipsoid's exact surface area (meter squared).
 
Direct(self, lat1, lon1, azi12, s12, outmask=384)
Solve the direct rhumb problem, optionally with the area.
 
Inverse(self, lat1, lon1, lat2, lon2, outmask=1536)
Solve the inverse rhumb problem.
 
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
  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='', **TMorder)
(Constructor)

 

New rhumbaux.RhumbAux.

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 the exact expressions for the Auxiliary Latitudes, otherwise use the Fourier series expansion (bool), see also property exact.
  • name - Optional name (str).
  • TMorder - Optional keyword argument TMorder, see property TMorder.
Raises:
  • ImportError - Package numpy not found or not installed, only required when exact is True.
  • RhumbError - Invalid a_earth, f or RA_TMorder.
Overrides: object.__init__

areaux (self, **exact)

 

Get this ellipsoid's exact surface area (meter squared).

Arguments:
  • exact - Optional exact (bool), overriding this rhumb's exact setting, if True, use the exact expression for the authalic radius otherwise the Taylor series.
Returns:
The (signed?) surface area (meter squared).
Raises:
  • AuxError - If exact=False and abs(flattening) exceeds property f_max.

Note: The area of a polygon encircling a pole can be found by adding areaux / 2 to the sum of S12 for each side of the polygon.

See Also: The area of rhumb polygons and method auxilats.AuxLat.AuthalicRadius2.

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.

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 epsilon**-2 (where epsilon is 2.0**-52). This position is extremely close to the actual pole and allows the calculation to be carried out in finite terms.

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

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.