예제 #1
0
    def test_find_bbox_indices(self):
        bbind = util.find_bbox_indices(self.grid, self.outside)
        self.assertTrue(np.array_equal(bbind, [0, 0, self.grid.shape[1], self.grid.shape[0]]))

        bbind = util.find_bbox_indices(self.grid, self.inside1)
        self.assertTrue(np.array_equal(bbind, [0, 0, self.grid.shape[1], self.grid.shape[0]]))

        bbind = util.find_bbox_indices(self.grid, self.inside2)
        self.assertTrue(np.array_equal(bbind, [1, 1, 5, 8]))
예제 #2
0
    def test_find_bbox_indices(self):
        bbind = util.find_bbox_indices(self.grid, self.outside)
        self.assertTrue(np.array_equal(bbind, [0, 0, self.grid.shape[1], self.grid.shape[0]]))

        bbind = util.find_bbox_indices(self.grid, self.inside1)
        self.assertTrue(np.array_equal(bbind, [0, 0, self.grid.shape[1], self.grid.shape[0]]))

        bbind = util.find_bbox_indices(self.grid, self.inside2)
        self.assertTrue(np.array_equal(bbind, [1, 1, 5, 8]))
예제 #3
0
    def test_find_bbox_indices(self):
        bbind = util.find_bbox_indices(self.grid, self.outside)
        assert np.array_equal(bbind,
                              [0, 0, self.grid.shape[1], self.grid.shape[0]])

        bbind = util.find_bbox_indices(self.grid, self.inside1)
        assert np.array_equal(bbind, [0, 0, 5, 8])

        bbind = util.find_bbox_indices(self.grid, self.inside2)
        assert np.array_equal(bbind, [1, 1, 4, 7])