Esempio n. 1
0
 def test_xy_2_cell_01(self):
     raster = PRaster(infolder + "/small25.tif")
     xi = self.xi
     yi = self.yi
     rows = self.rows
     cols = self.cols
     c_rows, c_cols = raster.xy_2_cell(xi, yi)
     res = (np.array_equal(rows, c_rows), np.array_equal(cols, c_cols))
     self.assertEqual(res, (True, True))
Esempio n. 2
0
 def test_xy_2_cell_02(self):
     raster = PRaster(infolder + "/small25.tif")
     x = 471927
     y = 4116048
     row, col = raster.xy_2_cell(x, y)
     self.assertEqual((43, 71), (row, col))