Package pygeodesy :: Module points :: Class LatLon_
[frames] | no frames]

Class LatLon_

   object --+            
            |            
 named._Named --+        
                |        
 named._NamedBase --+    
                    |    
latlonBase.LatLonBase --+
                        |
                       LatLon_
Known Subclasses:

Low-overhead LatLon class, mainly for Numpy2LatLon and Tuple2LatLon.

Instance Methods
 
__init__(self, latlonh, lon=None, height=0, wrap=False, datum=None, **name)
New LatLon_.
 
__eq__(self, other)
 
__ne__(self, other)
 
intermediateTo(self, other, fraction, height=None, wrap=False)
Locate the point at a given fraction, linearly between (or along) this and an other point.
 
toRepr(self, **kwds)
This LatLon_ as a string "class(<degrees>, ...)", ignoring keyword argument std=N/A.
 
toStr(self, form='d', joined=', ', **m_prec_sep_s_D_M_S)
Convert this point to a "lat, lon[, height][, name][, ...]" string, formatted in the given format.

Inherited from latlonBase.LatLonBase: PointsIter, __str__, antipode, bounds, boundsOf, chordTo, circin6, circum3, circum4_, compassAngle, compassAngleTo, cosineAndoyerLambertTo, cosineForsytheAndoyerLambertTo, cosineLawTo, destinationXyz, equals, equals3, equirectangularTo, euclideanTo, flatLocalTo, flatPolarTo, hartzell, haversineTo, height4, heightStr, hubenyTo, intersecant2, isantipode, isantipodeTo, isequalTo, isequalTo3, latlon2, latlon2round, latlon_, nearestOn6, nearestTo, normal, philam2, points, points2, radii11, rhumbAzimuthTo, rhumbDestination, rhumbDistanceTo, rhumbIntersecant2, rhumbLine, rhumbMidpointTo, thomasTo, to2ab, to3llh, to3xyz, toCartesian, toDatum, toEcef, toLocal, toLtp, toNormal, toNvector, toVector, toVector3d, toWm, vincentysTo

Inherited from named._NamedBase: __repr__, others

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__

Properties
  datum

Inherited from latlonBase.LatLonBase: Ecef, clipid, ellipsoidalLatLon, height, isEllipsoidal, isSpherical, isnormal, lam, lat, latlon, latlonheight, lon, phi, philam, philamheight, sphericalLatLon, xyz, xyz3, xyzh

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

Inherited from object: __class__

Method Details

__init__ (self, latlonh, lon=None, height=0, wrap=False, datum=None, **name)
(Constructor)

 

New LatLon_.

Arguments:
  • latlonh - Latitude (degrees or DMS str with N or S suffix) or a previous LatLon instance provided lon=None.
  • lon - Longitude (degrees or DMS str with E or W suffix) or C(None), indicating latlonh is a LatLon.
  • height - Optional height above (or below) the earth surface (meter, conventionally).
  • datum - Optional datum (Datum, Ellipsoid, Ellipsoid2, a_f2Tuple or scalar radius) or None.
  • wrap_name - Optional name=NN (str) and optional keyword argument wrap=False, if True, wrap or normalize lat and lon (bool).
Returns:
New instance (LatLon).
Raises:
  • RangeError - A lon or lat value outside the valid range and rangerrors set to True.
  • TypeError - If latlonh is not a LatLon.
  • UnitError - Invalid lat, lon or height.
Overrides: object.__init__

Note: The lat- and longitude values are taken as-given, un-clipped and un-validated.

See Also: latlonBase.LatLonBase for further details.

__eq__ (self, other)
(Equality operator)

 
Overrides: latlonBase.LatLonBase.__eq__

__ne__ (self, other)

 
Overrides: latlonBase.LatLonBase.__ne__

intermediateTo (self, other, fraction, height=None, wrap=False)

 

Locate the point at a given fraction, linearly between (or along) this and an other point.

Arguments:
  • other - The other point (LatLon).
  • fraction - Fraction between both points (float, 0.0 for this and 1.0 for the other point).
  • height - Optional height (meter), overriding the intermediate height.
  • wrap - If True, wrap or normalize and unroll the other point (bool).
Returns:
Intermediate point (same LatLon class).
Raises:
  • TypeError - Incompatible other type.

toRepr (self, **kwds)

 

This LatLon_ as a string "class(<degrees>, ...)", ignoring keyword argument std=N/A.

Arguments:
  • kwds - Optional, toStr keyword arguments.
Returns:
toStr() with keyword arguments (as str).
Overrides: named._Named.toRepr

See Also: latlonBase.LatLonBase.toRepr for further details.

toStr (self, form='d', joined=', ', **m_prec_sep_s_D_M_S)

 

Convert this point to a "lat, lon[, height][, name][, ...]" string, formatted in the given format.

Arguments:
  • form - The lat-/longitude format to use (str), see functions pygeodesy.latDMS or pygeodesy.lonDMS.
  • joined - Separator to join the lat-, longitude and height strings (str or None or NN for non-joined).
  • m - Optional unit of the height (str), use None to exclude height from the returned string.
  • prec_sep_s_D_M_S - Optional precision, separator, s_D, s_M, s_S and s_DMS keyword arguments, see function pygeodesy.toDMS for details.
Returns:
This point in the specified format, etc. (str or a 2- or 3-tuple (lat_str, lon_str[, height_str]) if joined is NN or None).
Overrides: named._Named.toStr

See Also: latlonBase.LatLonBase.toStr for further details.


Property Details

datum

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.