def test_create_raster_dataset(self): data, coords = georef.set_raster_origin(self.data.copy(), self.coords.copy(), 'upper') ds = georef.create_raster_dataset(data, coords, projection=self.proj, nodata=-32768) data, coords, proj = georef.extract_raster_dataset(ds) np.testing.assert_array_equal(data, self.data) np.testing.assert_array_almost_equal(coords, self.coords) self.assertEqual(proj.ExportToWkt(), self.proj.ExportToWkt())
def test_create_raster_dataset(self): data, coords = georef.set_raster_origin(self.data.copy(), self.coords.copy(), 'upper') ds = georef.create_raster_dataset(data, coords, projection=self.proj, nodata=-32768) data, coords, proj = georef.extract_raster_dataset(ds) np.testing.assert_array_equal(data, self.data) np.testing.assert_array_almost_equal(coords, self.coords) self.assertEqual(proj.ExportToWkt(), self.proj.ExportToWkt())
def test_create_raster_dataset(self): data, coords = georef.set_raster_origin( self.data.copy(), self.coords.copy(), "upper" ) ds = georef.create_raster_dataset( data, coords, projection=self.proj, nodata=-32768 ) data, coords, proj = georef.extract_raster_dataset(ds) np.testing.assert_array_equal(data, self.data) np.testing.assert_array_almost_equal(coords, self.coords) assert proj.ExportToWkt() == self.proj.ExportToWkt() data, coords = georef.set_raster_origin( self.data2.copy(), self.coords2.copy(), "upper" ) ds = georef.create_raster_dataset( data, coords, projection=self.proj, nodata=-32768 ) data, coords, proj = georef.extract_raster_dataset(ds, mode="edge") np.testing.assert_array_equal(data, self.data2) np.testing.assert_array_almost_equal(coords, self.coords2) assert proj.ExportToWkt() == self.proj.ExportToWkt()