Commit c9da9e59 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed test_reproject module.

parent 05d83a0e
Pipeline #3797 failed with stages
in 10 minutes and 6 seconds
......@@ -563,7 +563,7 @@ class SensorMapGeometryTransformer(object):
self.lons = lons
self.swath_definition = SwathDefinition(lons=lons, lats=lats)
self.area_extent_ll = [np.min(lons), np.min(lats), np.max(lons), np.max(lats)]
self.area_definition = None
self.area_definition = None # type: AreaDefinition
def _get_target_extent(self, tgt_epsg):
if tgt_epsg == 4326:
......
......@@ -61,7 +61,8 @@ class Test_SensorMapGeometryTransformer(TestCase):
# to Lon/Lat
dem_map_geo, dem_gt, dem_prj = SMGT.to_map_geometry(self.dem_sensor_geo, tgt_prj=4326)
self.assertIsInstance(dem_map_geo, np.ndarray)
self.assertEquals(dem_map_geo.shape, (286, 1058))
self.assertEquals(dem_map_geo.shape, (SMGT.area_definition.height,
SMGT.area_definition.width))
xmin, xmax, ymin, ymax = corner_coord_to_minmax(get_corner_coordinates(gt=dem_gt,
cols=dem_map_geo.shape[1],
rows=dem_map_geo.shape[0]))
......@@ -124,7 +125,9 @@ class Test_SensorMapGeometryTransformer3D(TestCase):
# to Lon/Lat
data_mapgeo_3D, dem_gt, dem_prj = SMGT.to_map_geometry(self.data_sensor_geo_3D, tgt_prj=4326)
self.assertIsInstance(data_mapgeo_3D, np.ndarray)
self.assertEquals(data_mapgeo_3D.shape, (286, 1058, 2))
# only validate number of bands (height and width are validated in 2D version
# fixed numbers may fail here due to float uncertainty errors
self.assertEquals(data_mapgeo_3D.shape[2], 2)
xmin, xmax, ymin, ymax = corner_coord_to_minmax(get_corner_coordinates(gt=dem_gt,
cols=data_mapgeo_3D.shape[1],
rows=data_mapgeo_3D.shape[0]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment