Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def process(self,product, date,skipPreprocessing=False):
try:
ee.Initialize()
except EEException as e:
print(e)
self._parse_config()
if product in ['sentinel1','atms','viirs','modis']:
dt = utils.decode_date(date)
tomorrow = (dt + datetime.timedelta(1)).strftime('%Y-%m-%d')
dateDir = os.path.join(self.workdir,dt.strftime('%Y%m%d'))
prodDir = os.path.join(dateDir,product)
geom = ee.Geometry.Rectangle(list(self.region.bounds.values[0]))
hand = ee.Image(self.hand)
if product == 'atms':
params = self.atmsParams
paramKeys = list(params.keys())
collId = self.atmsParams['waterFractionAsset']
worker = Atms(geom,date,tomorrow,collectionid=collId)
def process(self,product, date,skipPreprocessing=False):
if product in ['sentinel1','atms','viirs']:
dt = utils.decode_date(date)
tomorrow = (dt + datetime.timedelta(1)).strftime('%Y-%m-%d')
dateDir = os.path.join(self.workdir,dt.strftime('%Y%m%d'))
prodDir = os.path.join(dateDir,product)
geom = ee.Geometry.Rectangle(list(self.region.bounds.values[0]))
hand = ee.Image(self.hand)
if product == 'atms':
params = self.atmsParams
paramKeys = list(params.keys())
collId = self.atmsParams['waterFractionAsset']
worker = Atms(geom,date,tomorrow,collectionid=collId)