本文整理汇总了Python中nansat.domain.Domain.overlaps方法的典型用法代码示例。如果您正苦于以下问题:Python Domain.overlaps方法的具体用法?Python Domain.overlaps怎么用?Python Domain.overlaps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nansat.domain.Domain
的用法示例。
在下文中一共展示了Domain.overlaps方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_overlaps_contains
# 需要导入模块: from nansat.domain import Domain [as 别名]
# 或者: from nansat.domain.Domain import overlaps [as 别名]
def test_overlaps_contains(self):
Bergen = Domain(4326, "-te 5 60 6 61 -ts 500 500")
WestCoast = Domain(4326, "-te 1 58 6 64 -ts 500 500")
Norway = Domain(4326, "-te 3 55 30 72 -ts 500 500")
Paris = Domain(4326, "-te 2 48 3 49 -ts 500 500")
self.assertTrue(Bergen.overlaps(Norway))
self.assertTrue(Norway.contains(Bergen))
self.assertFalse(Bergen.contains(Norway))
self.assertTrue(Norway.overlaps(WestCoast))
self.assertFalse(Norway.contains(WestCoast))
self.assertFalse(Paris.overlaps(Norway))
self.assertFalse(Paris.contains(Norway))
示例2: test_overlaps
# 需要导入模块: from nansat.domain import Domain [as 别名]
# 或者: from nansat.domain.Domain import overlaps [as 别名]
def test_overlaps(self, get_border_geometry):
other_domain = MagicMock()
d = Domain()
d.overlaps(other_domain)
d.get_border_geometry.assert_called_once()
d.get_border_geometry().Overlaps.assert_called_once_with(other_domain.get_border_geometry())