Skip to content
Snippets Groups Projects

Lis blue

Closed Aurore Dupuis requested to merge int_stage_roman into develop
1 file
+ 13
0
Compare changes
  • Side-by-side
  • Inline
@@ -74,26 +74,38 @@ class SnowProduct:
logging.debug("product_path : " + self.product_path)
if SENTINEL2 in platform:
logging.debug("SENTINEL2 case")
self.acquisition_date = datetime.strptime(name_splitted[1], MUSCATE_DATETIME_FORMAT)
self.tile_id = name_splitted[3]
self.snow_mask = find_files(self.product_path, ".*_SNW_R2.(tif|TIF)")
self.metadata_file = find_files(self.product_path, ".*_MTD_ALL.(xml|XML)")
if self.snow_mask is None:
logging.debug("sentinel2 case with lis case :)")
self.snow_mask = find_files(self.product_path, ".*SNOW-FSC_.*(tif|TIF)")
logging.debug("snow mask : "+self.snow_mask)
self.metadata_file = find_files(self.product_path, ".*SNOW-.*.(xml|XML)")
elif LANDSAT8_OLITIRS_XS == platform:
logging.debug("LANDSAT8_OLITIRS_XS case")
self.acquisition_date = datetime.strptime(name_splitted[1], MUSCATE_DATETIME_FORMAT)
self.tile_id = name_splitted[3]
self.snow_mask = find_files(self.product_path, ".*_SNW_XS.(tif|TIF)")
self.metadata_file = find_files(self.product_path, ".*_MTD_ALL.(xml|XML)")
elif LANDSAT8 in platform and N2A in self.product_name:
logging.debug("LANDSAT8 case")
self.acquisition_date = datetime.strptime(name_splitted[3], LANDSAT_DATETIME_FORMAT)
self.tile_id = name_splitted[5]
self.snow_mask = find_files(self.product_path, ".*_SNW_XS.(tif|TIF)")
self.metadata_file = find_files(self.product_path, ".*_MTD_ALL.(xml|XML)")
elif LIS in platform:
logging.debug("LIS case")
self.acquisition_date = datetime.strptime(name_splitted[3], LIS_DATETIME_FORMAT)
self.tile_id = name_splitted[2]
self.snow_mask = find_files(self.product_path, ".*SNOW-FS.*C_.*(tif|TIF)")
self.metadata_file = find_files(self.product_path, ".*SNOW-.*.(xml|XML)")
elif FSC in platform:
logging.debug("FSC case")
self.acquisition_date = datetime.strptime(name_splitted[1], LIS_DATETIME_FORMAT)
self.tile_id = name_splitted[3]
self.snow_mask = find_files(self.product_path, ".*FSC(OG|TOC).(tif|TIF)")
@@ -104,6 +116,7 @@ class SnowProduct:
raise UnknownPlatform(msg)
if self.snow_mask is None:
logging.debug("looking for LIS_SEB product")
self.snow_mask = find_files(self.product_path, "LIS_SEB")
if self.metadata_file is None:
Loading