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

Class LatLon_

object --+    
         |    
bases.Base --+
             |
            LatLon_

Low-overhead LatLon class for Numpy2LatLon or Tuple2LatLon'

Instance Methods
 
__init__(self, lat, lon)
Creat a new, mininal, low-overhead LatLon_ instance, without heigth and datum.
 
__eq__(self, other)
 
__ne__(self, other)
 
points(self, points, closed=False, base=None)
Check a polygon given as an array, list, sequence, set or tuple of points.
 
to2ab(self)
Return the lat- and longitude in radians.
 
toStr(self, **unused)
This LatLon_ as a string "lat=<degrees>, lon=<degrees>".

Inherited from bases.Base: __repr__, __str__, classname, classof, others, toStr2

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

Properties
  lat
  lon

Inherited from object: __class__

Method Details

__init__(self, lat, lon)
(Constructor)

 

Creat a new, mininal, low-overhead LatLon_ instance, without heigth and datum.

Parameters:
  • lat - Latitude (degrees).
  • lon - Longitude (degrees).
Overrides: object.__init__

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

points(self, points, closed=False, base=None)

 

Check a polygon given as an array, list, sequence, set or tuple of points.

Parameters:
  • points - The points of the polygon (LatLon[])
  • closed - Optionally, treat polygon as closed and remove any duplicate or closing final points (bool).
  • base - Optional points base class (None).
Returns:
2-Tuple (number, sequence) of points (int, sequence).
Raises:
  • TypeError - Some points are not LatLon.
  • ValueError - Too few points.

to2ab(self)

 

Return the lat- and longitude in radians.

Returns:
2-Tuple (lat, lon) in (radians, radians).

toStr(self, **unused)

 

This LatLon_ as a string "lat=<degrees>, lon=<degrees>".

Parameters:
  • args - Optional, positional arguments.
Overrides: bases.Base.toStr