当前位置: 首页>>代码示例>>Python>>正文


Python Domain.overlaps方法代码示例

本文整理汇总了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))
开发者ID:nansencenter,项目名称:nansat,代码行数:14,代码来源:test_domain.py

示例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())
开发者ID:nansencenter,项目名称:nansat,代码行数:8,代码来源:test_domain.py


注:本文中的nansat.domain.Domain.overlaps方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。