Skip to content

Commit

Permalink
update current year of mosaics.
Browse files Browse the repository at this point in the history
  • Loading branch information
tharlestsa committed Feb 5, 2025
1 parent 09430ad commit 8286f6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/server/integration/py/publish_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ def processPeriod(tiles, periods, suffix = ''):

gee_multi_credentials(CREDENTIALS_DIR)

now = datetime.datetime.now()
current_year = now.year

if len(sys.argv) > 4:
TILES_BR = getWrsCodes(sys.argv[4])

for year in range(1985,2023+1):
for year in range(1985, current_year):

ee.Initialize()

Expand Down
4 changes: 3 additions & 1 deletion src/server/integration/py/update_mosaic_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ def getExpirationDate():
"dtEnd": '-10-30'
}
]
now = datetime.datetime.now()
current_year = now.year

for year in range(1985,2023+1):
for year in range(1985, current_year):
for satellite in SATELLITES:
if (satellite == 'L8' and year < 2013) or (satellite == 'L5' and year > 2011):
continue
Expand Down

0 comments on commit 8286f6c

Please sign in to comment.