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

Fixed IDE warnings.

parent 7f7db3a2
...@@ -78,6 +78,8 @@ class GMS_object(Dataset): ...@@ -78,6 +78,8 @@ class GMS_object(Dataset):
self.scenes_proc_ID = None # set by Output writer after creation/update of db record in table scenes_proc self.scenes_proc_ID = None # set by Output writer after creation/update of db record in table scenes_proc
self.mgrs_tiles_proc_ID = None # set by Output writer after creation/update of db rec in table mgrs_tiles_proc self.mgrs_tiles_proc_ID = None # set by Output writer after creation/update of db rec in table mgrs_tiles_proc
self.MGRS_info = None self.MGRS_info = None
self.lonlat_arr = None # set by self.write_tiles_to_ENVIfile
self.trueDataCornerUTM = None # set by self.from_tiles
# set pathes # set pathes
self.path_cloud_class_obj = '' self.path_cloud_class_obj = ''
...@@ -345,6 +347,7 @@ class GMS_object(Dataset): ...@@ -345,6 +347,7 @@ class GMS_object(Dataset):
"The 'mask_clouds_confidence' GeoArray can only be instanced with an array of the same dimensions " \ "The 'mask_clouds_confidence' GeoArray can only be instanced with an array of the same dimensions " \
"like GMS_obj.arr. Got %s." % str(cnfArr.shape) "like GMS_obj.arr. Got %s." % str(cnfArr.shape)
# noinspection PyProtectedMember
if cnfArr._nodata is None: if cnfArr._nodata is None:
cnfArr.nodata = DEF_D.get_outFillZeroSaturated(cnfArr.dtype)[0] cnfArr.nodata = DEF_D.get_outFillZeroSaturated(cnfArr.dtype)[0]
cnfArr.gt = self.arr.gt cnfArr.gt = self.arr.gt
...@@ -382,6 +385,7 @@ class GMS_object(Dataset): ...@@ -382,6 +385,7 @@ class GMS_object(Dataset):
"The 'ac_errors' GeoArray can only be instanced with an array of the same X/Y dimensions like " \ "The 'ac_errors' GeoArray can only be instanced with an array of the same X/Y dimensions like " \
"GMS_obj.arr. Got %s." % str(errArr.shape) "GMS_obj.arr. Got %s." % str(errArr.shape)
# noinspection PyProtectedMember
if errArr._nodata is None: if errArr._nodata is None:
errArr.nodata = DEF_D.get_outFillZeroSaturated(errArr.dtype)[0] errArr.nodata = DEF_D.get_outFillZeroSaturated(errArr.dtype)[0]
errArr.gt = self.arr.gt errArr.gt = self.arr.gt
...@@ -419,6 +423,7 @@ class GMS_object(Dataset): ...@@ -419,6 +423,7 @@ class GMS_object(Dataset):
"The 'spec_homo_errors' GeoArray can only be instanced with an array of the same X/Y dimensions " \ "The 'spec_homo_errors' GeoArray can only be instanced with an array of the same X/Y dimensions " \
"like GMS_obj.arr. Got %s." % str(errArr.shape) "like GMS_obj.arr. Got %s." % str(errArr.shape)
# noinspection PyProtectedMember
if errArr._nodata is None: if errArr._nodata is None:
errArr.nodata = DEF_D.get_outFillZeroSaturated(errArr.dtype)[0] errArr.nodata = DEF_D.get_outFillZeroSaturated(errArr.dtype)[0]
errArr.gt = self.arr.gt errArr.gt = self.arr.gt
...@@ -468,6 +473,7 @@ class GMS_object(Dataset): ...@@ -468,6 +473,7 @@ class GMS_object(Dataset):
"The 'accuracy_layers' GeoArray can only be instanced with an array of the same dimensions like " \ "The 'accuracy_layers' GeoArray can only be instanced with an array of the same dimensions like " \
"GMS_obj.arr. Got %s." % str(acc_lay.shape) "GMS_obj.arr. Got %s." % str(acc_lay.shape)
# noinspection PyProtectedMember
if acc_lay._nodata is None: if acc_lay._nodata is None:
acc_lay.nodata = DEF_D.get_outFillZeroSaturated(acc_lay.dtype)[0] acc_lay.nodata = DEF_D.get_outFillZeroSaturated(acc_lay.dtype)[0]
acc_lay.gt = self.arr.gt acc_lay.gt = self.arr.gt
...@@ -619,7 +625,6 @@ class GMS_object(Dataset): ...@@ -619,7 +625,6 @@ class GMS_object(Dataset):
except Exception: except Exception:
raise AttributeError("Can't set attribute %s." % key) raise AttributeError("Can't set attribute %s." % key)
self.acq_datetime = datetime.datetime.strptime(self.acq_datetime, '%Y-%m-%d %H:%M:%S.%f%z')
self.arr_shape, self.arr_pos = tuple_GMS_subset[1] self.arr_shape, self.arr_pos = tuple_GMS_subset[1]
self.arr = self.pathGen.get_path_imagedata() self.arr = self.pathGen.get_path_imagedata()
...@@ -1501,10 +1506,10 @@ class GMS_object(Dataset): ...@@ -1501,10 +1506,10 @@ class GMS_object(Dataset):
# raise NotImplementedError # FIXME implement working compression # raise NotImplementedError # FIXME implement working compression
# HLP_F.ENVIfile_to_ENVIcompressed(outpath_hdr) # HLP_F.ENVIfile_to_ENVIcompressed(outpath_hdr)
else: else:
if not is_tempfile: if not is_tempfile:
self.logger.warning( self.logger.warning("%s can not be written, because there is no corresponding attribute."
"%s can not be written, because there is no corresponding attribute." % print_dict[descriptor]) % print_dict[descriptor])
###################################### ######################################
# write GMS-file and update database # # write GMS-file and update database #
......
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