Fixed #27493 -- Fixed test failure with recent GDAL versions
This commit is contained in:
parent
371adc472a
commit
a269018e86
|
@ -360,8 +360,10 @@ class GDALRasterTests(unittest.TestCase):
|
||||||
self.assertEqual(target.width, 7)
|
self.assertEqual(target.width, 7)
|
||||||
self.assertEqual(target.height, 7)
|
self.assertEqual(target.height, 7)
|
||||||
self.assertEqual(target.bands[0].datatype(), source.bands[0].datatype())
|
self.assertEqual(target.bands[0].datatype(), source.bands[0].datatype())
|
||||||
self.assertEqual(target.origin, [9124842.791079799, 1589911.6476407414])
|
self.assertAlmostEqual(target.origin[0], 9124842.791079799)
|
||||||
self.assertEqual(target.scale, [223824.82664250192, -223824.82664250192])
|
self.assertAlmostEqual(target.origin[1], 1589911.6476407414)
|
||||||
|
self.assertAlmostEqual(target.scale[0], 223824.82664250192)
|
||||||
|
self.assertAlmostEqual(target.scale[1], -223824.82664250192)
|
||||||
self.assertEqual(target.skew, [0, 0])
|
self.assertEqual(target.skew, [0, 0])
|
||||||
|
|
||||||
result = target.bands[0].data()
|
result = target.bands[0].data()
|
||||||
|
|
|
@ -99,11 +99,12 @@ class RasterFieldTest(TransactionTestCase):
|
||||||
# Confirm raster has been transformed to the default srid
|
# Confirm raster has been transformed to the default srid
|
||||||
self.assertEqual(r.rast.srs.srid, 4326)
|
self.assertEqual(r.rast.srs.srid, 4326)
|
||||||
# Confirm geotransform is in lat/lon
|
# Confirm geotransform is in lat/lon
|
||||||
self.assertEqual(
|
expected = [
|
||||||
r.rast.geotransform,
|
-87.9298551266551, 9.459646421449934e-06, 0.0, 23.94249275457565,
|
||||||
[-87.9298551266551, 9.459646421449934e-06, 0.0,
|
0.0, -9.459646421449934e-06,
|
||||||
23.94249275457565, 0.0, -9.459646421449934e-06]
|
]
|
||||||
)
|
for val, exp in zip(r.rast.geotransform, expected):
|
||||||
|
self.assertAlmostEqual(exp, val)
|
||||||
|
|
||||||
def test_verbose_name_arg(self):
|
def test_verbose_name_arg(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue