bounds.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:cyphon 作者: dunbarcyber 项目源码 文件源码
def __init__(self, w_lng=180.0, s_lat=90.0, e_lng=-180.0, n_lat=-90.0):
        """
        IMPORTANT: Initialization arguments are ordered w, s, e, n in order
        to accept arguments from a GEOSGeometry extent, which is a 4-tuple
        consisting of (xmin, ymin, xmax, ymax). This makes it easy to
        initialize bounds directly, e.g.:

        >>> from django.contrib.gis.geos import Polygon
        >>> polygon = Polygon(((0, 0), (0, 1), (1, 1), (1, 0), (0, 0)))
        >>> bounds = Bounds(*polygon.extent)

        """
        self._n_lat = n_lat
        self._s_lat = s_lat
        self._e_lng = e_lng
        self._w_lng = w_lng

    # TODO(LH): add validations for lat/lng values
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号