Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gaetano Raffaele
NDVITrend
Commits
9c7d836f
Commit
9c7d836f
authored
Jan 19, 2018
by
Gaetano Raffaele
Browse files
Cross-year date interval selection and trend computation (pre).
parent
aad7dea8
Changes
1
Hide whitespace changes
Inline
Side-by-side
NDVITrend.py
View file @
9c7d836f
...
@@ -107,7 +107,7 @@ def getCoherentReferencePeriod(dates_fn,start_date=(1,1),end_date=(12,31),dates_
...
@@ -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
):
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'
]
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.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
])]
cmd
+=
[
'-ndvi.reduce.cumul.month2'
,
str
(
ed
[
0
]),
'-ndvi.reduce.cumul.day2'
,
str
(
ed
[
1
])]
subprocess
.
call
(
cmd
)
subprocess
.
call
(
cmd
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment