本文整理汇总了Python中mapproxy.grid.bbox_contains函数的典型用法代码示例。如果您正苦于以下问题:Python bbox_contains函数的具体用法?Python bbox_contains怎么用?Python bbox_contains使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbox_contains函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: contains
def contains(self, other):
if not isinstance(other, MapExtent):
raise NotImplemented
if self.is_default:
# DefaultMapExtent contains everything
return True
return bbox_contains(self.bbox, other.bbox_for(self.srs))
示例2: contains
def contains(self, bbox, srs):
bbox = self._bbox_in_coverage_srs(bbox, srs)
return bbox_contains(self.bbox, bbox)
示例3: test_no_intersect_only_vertical
def test_no_intersect_only_vertical(self):
b1 = (0, 0, 10, 10)
b2 = (20, 0, 30, 10)
assert not bbox_contains(b1, b2)
assert not bbox_contains(b2, b1)
示例4: test_overlap
def test_overlap(self):
b1 = (0, 0, 10, 10)
b2 = (-5, -5, 5, 5)
assert not bbox_contains(b1, b2)
assert not bbox_contains(b2, b1)
示例5: test_contains_touch
def test_contains_touch(self):
b1 = (0, 0, 10, 10)
b2 = (0, 0, 8, 8)
assert bbox_contains(b1, b2)
assert not bbox_contains(b2, b1)
示例6: test_full_contains
def test_full_contains(self):
b1 = (0, 0, 10, 10)
b2 = (2, 2, 8, 8)
assert bbox_contains(b1, b2)
assert not bbox_contains(b2, b1)
示例7: test_no_intersect_touch_side
def test_no_intersect_touch_side(self):
b1 = (0, 0, 10, 10)
b2 = (0, 10, 10, 20)
assert not bbox_contains(b1, b2)
assert not bbox_contains(b2, b1)
示例8: contains
def contains(self, other):
if not isinstance(other, MapExtent):
raise NotImplemented
return bbox_contains(self.bbox, other.bbox_for(self.srs))