Package pygeodesy :: Module bases
[frames] | no frames]

Module bases

(INTERNAL) Common base classes.

After (C) Chris Veness 2011-2015 published under the same MIT Licence**, see http://www.movable-type.co.uk/scripts/latlong.html and http://www.movable-type.co.uk/scripts/latlong-vectors.html.


Version: 17.05.25

Classes
  Base
(INTERNAL) Base class.
  LatLonHeightBase
(INTERNAL) Base class for LatLon points on spherical or ellipsiodal earth models.
  Named
(INTERNAL) Named base class.
  VectorBase
(INTERNAL) Used by vector3d.
Functions
 
isclockwise(points)
Determine direction of a polygon defined by a list, sequence, set or tuple of LatLon points.
Function Details

isclockwise(points)

 

Determine direction of a polygon defined by a list, sequence, set or tuple of LatLon points.

Parameters:
  • points - The points defining the polygon (LatLon[]).
Returns:
True if clockwise, False otherwise.
Raises:
  • TypeError - Some points are not LatLon.
  • ValueError - Too few points or polygon has zero area.

Example:

>>> f = LatLon(45,1), LatLon(45,2), LatLon(46,2), LatLon(46,1)
>>> isclockwise(f)  # False
>>> t = LatLon(45,1), LatLon(46,1), LatLon(46,2), LatLon(45,1)
>>> isclockwise(t)  # True