Esempio n. 1
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
    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