コード例 #1
0
def bounds(points, wrap=True, LatLon=None):
    '''DEPRECATED, use function L{boundsOf}.

       @return: 2-Tuple C{(latlonSW, latlonNE)} as B{C{LatLon}}
                or 4-Tuple C{(latS, lonW, latN, lonE)} if
                B{C{LatLon}} is C{None}.
    '''
    from points import boundsOf
    return tuple(boundsOf(points, wrap=wrap, LatLon=LatLon))
コード例 #2
0
 def __init__(self, corners):
     n = ''
     try:
         n, cs = len2(corners)
         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._corners = cs = cs[:n]
         self._nc = n
         self._cw = 1 if isclockwise(cs, adjust=False, wrap=False) else -1
         if self._cw != isconvex_(cs, adjust=False, wrap=False):
             raise ValueError
     except ValueError:
         raise ValueError('invalid %s[%s]: %r' % ('corners', n, corners))
     self._clipped = self._points = []
コード例 #3
0
ファイル: __init__.py プロジェクト: GliderGeek/PyGeodesy
 def bounds(*args, **kwds):
     '''DEPRECATED, use function C{boundsOf}.
     '''
     return points.boundsOf(*args, **kwds)