diff --git a/TimeSeries/planet_mosaics.py b/TimeSeries/planet_mosaics.py index c7ec32b4de46fe3dd4cca59a89e6389494b04579..0cd27f2f58f5a337aff43fcddec434880c185279 100644 --- a/TimeSeries/planet_mosaics.py +++ b/TimeSeries/planet_mosaics.py @@ -38,7 +38,7 @@ def fetch(shp, dt, out_fld, api_key): ed = datetime.strptime(dt.split('/')[1], '%Y-%m') delta = relativedelta(ed, sd) mosaic_dates = [str(d.year) + '-' + str(d.month).zfill(2) - for d in (sd + relativedelta(months=+n) for n in range(delta.months+1))] + for d in (sd + relativedelta(months=+n) for n in range(12*delta.years + delta.months + 1))] if not os.path.exists(out_fld): os.makedirs(out_fld)