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

Fixed faulty output validation.

parent 0e85970e
Pipeline #3415 passed with stages
in 20 minutes and 13 seconds
......@@ -748,10 +748,14 @@ class SensorMapGeometryTransformer(object):
out_gt, out_prj = self._get_gt_prj_from_areadefinition(self.area_definition)
# output validation
if not data_mapgeo.shape == (self.area_definition.y_size, self.area_definition.x_size):
raise RuntimeError('The computed map geometry output does not have the expected shape. '
'Expected: %s; output array shape: %s.'
% (self.area_definition.y_size, self.area_definition.x_size), data_mapgeo.shape)
if not data_mapgeo.shape[:2] == (self.area_definition.y_size, self.area_definition.x_size):
raise RuntimeError('The computed map geometry output does not have the expected number of rows/columns. '
'Expected: %s; output: %s.'
% (str((self.area_definition.y_size, self.area_definition.x_size)),
str(data_mapgeo.shape[:2])))
if data.ndim > 2 and data_mapgeo.ndim == 2:
raise RuntimeError('The computed map geometry output only one band instead of the expected %d bands.'
% data.shape[2])
return data_mapgeo, out_gt, out_prj # type: Tuple[np.ndarray, tuple, str]
......
__version__ = '0.14.5'
__versionalias__ = '20181214_03'
__version__ = '0.14.6'
__versionalias__ = '20181214_04'
Supports Markdown
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