コード例 #1
0
ファイル: test_orthodrome.py プロジェクト: wuxyair/pyrocko
    def test_point_in_region(self):
        testdata = [
            ((-20., 180.), (-180., 180., -90., 90.), True),
            ((-20., 180.), (170., -170., -90., 90.), True),
            ((-20., 160.), (170., -170., -90., 90.), False),
            ((-20., -160.), (170., -170., -90., 90.), False),
        ]

        for point, region, in_region in testdata:
            assert bool(orthodrome.point_in_region(point, region)) == in_region
コード例 #2
0
    def test_point_in_region(self):
        testdata = [
            ((-20., 180.), (-180., 180., -90., 90.), True),
            ((-20., 180.), (170., -170., -90., 90.), True),
            ((-20., 160.), (170., -170., -90., 90.), False),
            ((-20., -160.), (170., -170., -90., 90.), False),
        ]

        for point, region, in_region in testdata:
            assert bool(orthodrome.point_in_region(point, region)) == in_region