def areaof(points, adjust=True, radius=_R_M, wrap=True): '''DEPRECATED, use function L{areaOf}. ''' from pygeodesy.points import areaOf from pygeodesy.utily import R_M # PYCHOK shadows? r = R_M if radius is _R_M else radius # PYCHOK shadows? return areaOf(points, adjust=adjust, radius=r, wrap=wrap)
def __init__(self, corners, name=__name__): n, cs = 0, corners try: # check the clip box/region n, cs = len2(cs) if n == 2: # make a box b, l, t, r = boundsOf(cs, wrap=False) cs = LL_(b, l), LL_(t, l), LL_(t, r), LL_(b, r) n, cs = points2(cs, closed=True) self._cs = cs = cs[:n] self._nc = n self._cw = isconvex_(cs, adjust=False, wrap=False) if not self._cw: raise ValueError(_not_convex_) if areaOf(cs, adjust=True, radius=1, wrap=True) < EPS: raise ValueError('near-zero area') except (PointsError, TypeError, ValueError) as x: raise ClipError(name, n, cs, txt=str(x)) self.name = name
def areaof(points, adjust=True, radius=R_M, wrap=True): '''DEPRECATED, use function L{areaOf}. ''' from pygeodesy.points import areaOf return areaOf(points, adjust=adjust, radius=radius, wrap=wrap)