Package pygeodesy :: Package geodesicx :: Module gx :: Class GeodesicExact
[frames] | no frames]

Class GeodesicExact

  object --+                
           |                
named._Named --+            
               |            
named._NamedBase --+        
                   |        
    karney._CapsBase --+    
                       |    
   gxbases._GeodesicBase --+
                           |
                          GeodesicExact

A pure Python version of Karney's C++ class GeodesicExact, modeled after Karney's Python class geodesic.Geodesic.

Instance Methods
 
__init__(self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.257223..., f=None, C4order=None, **name_C4Order)
New GeodesicExact instance.
 
ArcDirect(self, lat1, lon1, azi1, a12, outmask=1929)
Solve the Direct geodesic problem in terms of (spherical) arc length.
 
ArcDirectLine(self, lat1, lon1, azi1, a12, caps=32671, **name)
Define a GeodesicLineExact in terms of the direct geodesic problem and as arc length.
 
Area(self, polyline=False, **name)
Set up a GeodesicAreaExact to compute area and perimeter of a polygon.
 
C4f(self, eps)
Evaluate the C4x coefficients for eps.
 
Direct(self, lat1, lon1, azi1, s12=0, outmask=1929)
Solve the Direct geodesic problem
 
Direct3(self, lat1, lon1, azi1, s12)
Return the destination lat, lon and reverse azimuth (final bearing) in degrees.
 
DirectLine(self, lat1, lon1, azi1, s12, caps=1929, **name)
Define a GeodesicLineExact in terms of the direct geodesic problem and as distance.
 
Inverse(self, lat1, lon1, lat2, lon2, outmask=1929)
Perform the Inverse geodesic calculation.
 
Inverse1(self, lat1, lon1, lat2, lon2, wrap=False)
Return the non-negative, angular distance in degrees.
 
Inverse3(self, lat1, lon1, lat2, lon2)
Return the distance in meter and the forward and reverse azimuths (initial and final bearing) in degrees.
 
InverseLine(self, lat1, lon1, lat2, lon2, caps=1929, **name)
Define a GeodesicLineExact in terms of the Inverse geodesic problem.
 
Line(self, lat1, lon1, azi1, caps=32671, **name)
Set up a GeodesicLineExact to compute several points on a single geodesic.
 
Polygon(self, polyline=False, **name)
Set up a GeodesicAreaExact to compute area and perimeter of a polygon.
 
toStr(self, **prec_sep_name)
Return this GeodesicExact 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, renamed, 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_CAPS, LINE_OFF, LONGITUDE, LONG_UNROLL, REDUCEDLENGTH, STANDARD

Properties
  a
  b
  c2x
  c2
  C4order
  C4Order
DEPRECATED, use property C4order.
  datum
  e2
  ellipsoid
  ep2
  e22
  flattening
  f
  f1
  n

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_ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.257223..., f=None, C4order=None, **name_C4Order)
(Constructor)

 

New GeodesicExact instance.

Arguments:
  • a_ellipsoid - An ellipsoid (Ellipsoid) or datum (Datum) or the equatorial radius of the ellipsoid (scalar, conventionally in meter), see f.
  • f - The flattening of the ellipsoid (scalar) if a_ellipsoid is specified as scalar.
  • C4order - Optional series expansion order (int), see property C4order, default 30.
  • name_C4Order - Optional name=NN (str) and the DEPRECATED keyword argument C4Order, use C4order instead.
Raises:
Overrides: object.__init__

ArcDirect (self, lat1, lon1, azi1, a12, outmask=1929)

 

Solve the Direct geodesic problem in terms of (spherical) arc length.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • azi1 - Azimuth at the first point (compass degrees).
  • a12 - Arc length between the points (degrees), can be negative.
  • outmask - Bit-or'ed combination of Caps values specifying the quantities to be returned.
Returns:
A GDict with up to 12 items lat1, lon1, azi1, lat2, lon2, azi2, m12, a12, s12, M12, M21, S12 with lat1, lon1, azi1 and arc length a12 always included.

See Also: C++ GeodesicExact.ArcDirect and Python Geodesic.ArcDirect.

ArcDirectLine (self, lat1, lon1, azi1, a12, caps=32671, **name)

 

Define a GeodesicLineExact in terms of the direct geodesic problem and as arc length.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • azi1 - Azimuth at the first point (compass degrees).
  • a12 - Arc length between the points (degrees), can be negative.
  • caps - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returned by calls to GeodesicLineExact.Position and GeodesicLineExact.ArcPosition.
  • name - Optional name=NN (str).
Returns:
A GeodesicLineExact instance.
Notes:
  • The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem.
  • Latitude lat1 should in the range [-90, +90].

See Also: C++ GeodesicExact.ArcDirectLine and Python Geodesic.ArcDirectLine.

Area (self, polyline=False, **name)

 

Set up a GeodesicAreaExact to compute area and perimeter of a polygon.

Arguments:
  • polyline - If True, compute the perimeter only, otherwise the perimeter and area (bool).
  • name - Optional name=NN (str).
Returns:
A GeodesicAreaExact instance.

Note: The debug setting is passed as verbose to the returned GeodesicAreaExact instance.

C4f (self, eps)

 

Evaluate the C4x coefficients for eps.

Arguments:
  • eps - Polynomial factor (float).
Returns:
C4order-Tuple of C4x(eps) coefficients.

Direct (self, lat1, lon1, azi1, s12=0, outmask=1929)

 

Solve the Direct geodesic problem

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • azi1 - Azimuth at the first point (compass degrees).
  • s12 - Distance between the points (meter), can be negative.
  • outmask - Bit-or'ed combination of Caps values specifying the quantities to be returned.
Returns:
A GDict with up to 12 items lat1, lon1, azi1, lat2, lon2, azi2, m12, a12, s12, M12, M21, S12 with lat1, lon1, azi1 and distance s12 always included.

See Also: C++ GeodesicExact.Direct and Python Geodesic.Direct.

Direct3 (self, lat1, lon1, azi1, s12)

 

Return the destination lat, lon and reverse azimuth (final bearing) in degrees.

Returns:
Destination3Tuple(lat, lon, final).

DirectLine (self, lat1, lon1, azi1, s12, caps=1929, **name)

 

Define a GeodesicLineExact in terms of the direct geodesic problem and as distance.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • azi1 - Azimuth at the first point (compass degrees).
  • s12 - Distance between the points (meter), can be negative.
  • caps - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returned by calls to GeodesicLineExact.Position.
  • name - Optional name=NN (str).
Returns:
A GeodesicLineExact instance.
Notes:
  • The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem.
  • Latitude lat1 should in the range [-90, +90].

See Also: C++ GeodesicExact.DirectLine and Python Geodesic.DirectLine.

Inverse (self, lat1, lon1, lat2, lon2, outmask=1929)

 

Perform the Inverse geodesic calculation.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • lat2 - Latitude of the second point (degrees).
  • lon2 - Longitude of the second point (degrees).
  • outmask - Bit-or'ed combination of Caps values specifying the quantities to be returned.
Returns:
A GDict with up to 12 items lat1, lon1, azi1, lat2, lon2, azi2, m12, a12, s12, M12, M21, S12 with lat1, lon1, azi1 and distance s12 always included.
Notes:
  • The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem.
  • Both lat1 and lat2 should in the range [-90, +90].

See Also: C++ GeodesicExact.InverseLine and Python Geodesic.InverseLine.

Inverse1 (self, lat1, lon1, lat2, lon2, wrap=False)

 

Return the non-negative, angular distance in degrees.

Arguments:
  • wrap - If True, wrap or normalize and unroll lat2 and lon2 (bool).

Inverse3 (self, lat1, lon1, lat2, lon2)

 

Return the distance in meter and the forward and reverse azimuths (initial and final bearing) in degrees.

Returns:
Distance3Tuple(distance, initial, final).

InverseLine (self, lat1, lon1, lat2, lon2, caps=1929, **name)

 

Define a GeodesicLineExact in terms of the Inverse geodesic problem.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • lat2 - Latitude of the second point (degrees).
  • lon2 - Longitude of the second point (degrees).
  • caps - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returned by calls to GeodesicLineExact.Position and GeodesicLineExact.ArcPosition.
  • name - Optional name=NN (str).
Returns:
A GeodesicLineExact instance.
Notes:
  • The third point of the GeodesicLineExact is set to correspond to the second point of the Inverse geodesic problem.
  • Both lat1 and lat2 should in the range [-90, +90].

See Also: C++ GeodesicExact.InverseLine and Python Geodesic.InverseLine.

Line (self, lat1, lon1, azi1, caps=32671, **name)

 

Set up a GeodesicLineExact to compute several points on a single geodesic.

Arguments:
  • lat1 - Latitude of the first point (degrees).
  • lon1 - Longitude of the first point (degrees).
  • azi1 - Azimuth at the first point (compass degrees).
  • caps - Bit-or'ed combination of Caps values specifying the capabilities the GeodesicLineExact instance should possess, i.e., which quantities can be returnedby calls to GeodesicLineExact.Position and GeodesicLineExact.ArcPosition.
  • name - Optional name=NN (str).
Returns:
A GeodesicLineExact instance.

Note: If the point is at a pole, the azimuth is defined by keeping lon1 fixed, writing lat1 = ±(90 − ε), and taking the limit ε → 0+.

See Also: C++ GeodesicExact.Line and Python Geodesic.Line.

Polygon (self, polyline=False, **name)

 

Set up a GeodesicAreaExact to compute area and perimeter of a polygon.

Arguments:
  • polyline - If True, compute the perimeter only, otherwise the perimeter and area (bool).
  • name - Optional name=NN (str).
Returns:
A GeodesicAreaExact instance.

Note: The debug setting is passed as verbose to the returned GeodesicAreaExact instance.

toStr (self, **prec_sep_name)

 

Return this GeodesicExact as string.

Returns:
GeodesicExact (str).
Overrides: named._Named.toStr

See Also: Ellipsoid.toStr for further details.


Property Details

a

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

b

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

c2x

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

c2

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

C4order

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset(inst, val) - Set and cache, memoize the property value.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

C4Order

DEPRECATED, use property C4order.

Get method:
C4Order(self) - DEPRECATED, use property C4order.
Set method:
C4Order(self, order) - DEPRECATED, use property C4order.

datum

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

e2

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

ellipsoid

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

ep2

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

e22

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

flattening

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

f

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

f1

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

n

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.