mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
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.height, 7)
|
||||
self.assertEqual(target.bands[0].datatype(), source.bands[0].datatype())
|
||||
self.assertEqual(target.origin, [9124842.791079799, 1589911.6476407414])
|
||||
self.assertEqual(target.scale, [223824.82664250192, -223824.82664250192])
|
||||
self.assertAlmostEqual(target.origin[0], 9124842.791079799)
|
||||
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])
|
||||
|
||||
result = target.bands[0].data()
|
||||
|
@ -99,11 +99,12 @@ class RasterFieldTest(TransactionTestCase):
|
||||
# Confirm raster has been transformed to the default srid
|
||||
self.assertEqual(r.rast.srs.srid, 4326)
|
||||
# Confirm geotransform is in lat/lon
|
||||
self.assertEqual(
|
||||
r.rast.geotransform,
|
||||
[-87.9298551266551, 9.459646421449934e-06, 0.0,
|
||||
23.94249275457565, 0.0, -9.459646421449934e-06]
|
||||
)
|
||||
expected = [
|
||||
-87.9298551266551, 9.459646421449934e-06, 0.0, 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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user