Commit 35283e4b authored by Rémi Jugier's avatar Rémi Jugier
Browse files

correctin

parent 4cfd8f39
......@@ -881,7 +881,7 @@ class snow_detector:
bandMathPass3 = None
def passfsc(self):
# write NDSIx100 (0-100), nosnow (0) cloud (205) and nodata (254)
# write NDSIx100 (0-100), nosnow (0) cloud (205) and nodata (254, 255 in cosims_mode)
expression = "(im2b1 == 100)?100*"+str(self.ndsi_formula)+":im2b1"
bandMathApp = band_math([self.img,self.final_mask_path],
self.ndsi_path,
......@@ -890,9 +890,9 @@ class snow_detector:
otb.ImagePixelType_uint8)
bandMathApp.ExecuteAndWriteOutput()
bandMathApp = None
edit_nodata_value(self.ndsi_path, nodata_value=self.label_no_data)
edit_nodata_value(self.ndsi_path, nodata_value=int(self.label_no_data))
# write top-of-canopy FSC (0-100), nosnow (0) cloud (205) and nodata (254)
# write top-of-canopy FSC (0-100), nosnow (0) cloud (205) and nodata (254, 255 in cosims_mode)
#~ self.fscToc_Eq="1.45*ndsi-0.01"
eq="min("+str(self.fscToc_Eq)+",1)"
exp=eq.replace("ndsi", "im1b1/100") # ndsi was written in %
......@@ -904,9 +904,9 @@ class snow_detector:
otb.ImagePixelType_uint8)
bandMathApp.ExecuteAndWriteOutput()
bandMathApp = None
edit_nodata_value(self.fscToc_path, nodata_value=self.label_no_data)
edit_nodata_value(self.fscToc_path, nodata_value=int(self.label_no_data))
# write on-ground FSC (0-100), nosnow (0) cloud (205) and nodata (254)
# write on-ground FSC (0-100), nosnow (0) cloud (205) and nodata (254, 255 in cosims_mode)
#~ self.fscOg_Eq="fscToc/(1-tcd)"
eq="min("+str(self.fscOg_Eq)+",1)"
exp=eq.replace("fscToc", "im1b1/100") # fscToc was written in %
......@@ -919,4 +919,4 @@ class snow_detector:
otb.ImagePixelType_uint8)
bandMathApp.ExecuteAndWriteOutput()
bandMathApp = None
edit_nodata_value(self.fscOg_path, nodata_value=self.label_no_data)
edit_nodata_value(self.fscOg_path, nodata_value=int(self.label_no_data))
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