Commit 9c7d836f authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

Cross-year date interval selection and trend computation (pre).

parent aad7dea8
......@@ -107,7 +107,7 @@ def getCoherentReferencePeriod(dates_fn,start_date=(1,1),end_date=(12,31),dates_
def computeNDVITrends(series_fn,dates_fn,start_date=(1,1),end_date=(12,31),dates_per_year=23):
cmd = ['otbcli_TimeSeriesIndexTrend', '-ndvits', series_fn, '-ndvidates', dates_fn, '-ndvi.reduce', 'cumul']
sd,ed = getCoherentReferencePeriod(dates_fn,start_date,end_date,dates_per_year)
sd,ed,N = getCoherentReferencePeriod(dates_fn,start_date,end_date,dates_per_year)
cmd += ['-ndvi.reduce.cumul.month1', str(sd[0]),'-ndvi.reduce.cumul.day1', str(sd[1])]
cmd += ['-ndvi.reduce.cumul.month2', str(ed[0]), '-ndvi.reduce.cumul.day2', str(ed[1])]
subprocess.call(cmd)
Markdown is supported
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