Package pygeodesy :: Module geodsolve :: Class GeodesicSolve
[frames] | no frames]

Class GeodesicSolve

  object --+        
           |        
named._Named --+    
               |    
named._NamedBase --+
                   |
                  GeodesicSolve

Wrapper to invoke Karney's GeodSolve as an Exact version of Karney's Python class Geodesic wrapper.


Notes:
Instance Methods
 
__init__(self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298...., f=None, name='')
New GeodesicSolve instance.
 
Area(self, polyline=False, name='')
Set up an GeodesicAreaExact to compute area and perimeter of a polygon.
 
Polygon(self, polyline=False, name='')
Set up an GeodesicAreaExact to compute area and perimeter of a polygon.
 
Direct(self, lat1, lon1, azi1, s12, *unused)
Return the Direct result.
 
Direct3(self, lat1, lon1, azi1, s12)
Return the destination lat, lon and reverse azimuth (final bearing) in degrees.
 
Inverse(self, lat1, lon1, lat2, lon2, *unused)
Return the Inverse result.
 
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.
 
invoke(self, *options, **stdin)
Invoke the GeodSolve executable and return the result.
 
Line(self, *args, **kwds)
Not implemented.
 
toStr(self, prec=6, sep=', ', **unused)
Return this GeodesicSolve as string.

Inherited from named._NamedBase: __repr__, __str__, others, toRepr

Inherited from named._Named: _DOT_, attrs, classof, copy, rename, toStr2

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  STANDARD = 0
hash(x)
  REDUCEDLENGTH = 0
hash(x)
  LONG_UNROLL = 0
hash(x)
  LONGITUDE = 0
hash(x)
  LATITUDE = 0
hash(x)
  EMPTY = 0
hash(x)
  GEODESICSCALE = 0
hash(x)
  DISTANCE_IN = 0
hash(x)
  DISTANCE = 0
hash(x)
  AZIMUTH = 0
hash(x)
  AREA = 0
hash(x)
  ALL = 0
hash(x)
Properties
  a
Get the equatorial radius, semi-axis (meter).
  debug
Get the debug option (bool).
  ellipsoid
Get the ellipsoid (Ellipsoid).
  Exact
Get the GeodesicExact usage (bool).
  f
Get the ellipsoid's flattening (float), (a - b) / a, 0 for spherical, negative for prolate.
  GeodSolve
Get the GeodSolve executable (filename).
  invokation
Get the most recent GeodSolve invokation number (int).
  prec
Get the precision, number of decimal digits (int).
  reverse2
Get the azi2 direction (bool).
  status
Get the most recent GeodSolve return code (int, str) or None.
  unroll
Get the lon2 unroll'ing (bool).
  verbose
Get the verbose option (bool).
  version
Get the result of "GeodSolve --version".

Inherited from named._Named: classname, classnaming, name, named, named2, named3, named4

Inherited from object: __class__

Method Details

__init__ (self, a_ellipsoid=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298...., f=None, name='')
(Constructor)

 

New GeodesicSolve instance.

Arguments:
  • a_ellipsoid - An ellipsoid (Ellipsoid) or datum (datum), or the equatorial radius of the ellipsoid (meter).
  • f - The flattening of the ellipsoid (scalar) if a_ellipsoid is specified as meter.
  • name - Optional name (str).
Overrides: object.__init__

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

 

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

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

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

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

 

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

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

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

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

 

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

Returns:
Destination3Tuple(lat, lon, final).

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).

invoke (self, *options, **stdin)

 

Invoke the GeodSolve executable and return the result.

Arguments:
  • options - No, one or several GeodSolve command line options (strs).
  • stdin - Optional input to pass to GeodSolve.stdin (str).
Returns:
The GeodSolve.stdout and .stderr output (str).
Raises:
  • GeodesicError - On any error, including a non-zero return code from GeodSolve.

Note: The GeodSolve return code is in status.

Line (self, *args, **kwds)

 

Not implemented.

Raises:
  • NotImplementedError - Always.

toStr (self, prec=6, sep=', ', **unused)

 

Return this GeodesicSolve 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 - Optional separator to join (str).
Returns:
GeodesicSolve items (str).
Overrides: named._Named.toStr

Property Details

a

Get the equatorial radius, semi-axis (meter).

Get method:
_fget(inst)
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst)

debug

Get the debug option (bool).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

ellipsoid

Get the ellipsoid (Ellipsoid).

Get method:
_fget(inst)
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst)

Exact

Get the GeodesicExact usage (bool).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

f

Get the ellipsoid's flattening (float), (a - b) / a, 0 for spherical, negative for prolate.

Get method:
_fget(inst)
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst)

GeodSolve

Get the GeodSolve executable (filename).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

invokation

Get the most recent GeodSolve invokation number (int).

Get method:
invokation(self) - Get the most recent GeodSolve invokation number (int).
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst)

prec

Get the precision, number of decimal digits (int).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

reverse2

Get the azi2 direction (bool).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

status

Get the most recent GeodSolve return code (int, str) or None.

Get method:
status(self) - Get the most recent GeodSolve return code (int, str) or None.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst)

unroll

Get the lon2 unroll'ing (bool).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

verbose

Get the verbose option (bool).

Get method:
_fget(inst)
Set method:
_fset(inst, val)
Delete Method:
_fdel(inst)

version

Get the result of "GeodSolve --version".

Get method:
version(self) - Get the result of "GeodSolve --version".
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst)