Learn Data & AI Skills | 50% off
Get 50% off unlimited learning

sits (version 0.10.0)

.sits_timeline_match: Find dates in the input data cube that match those of the patterns

Description

For correct classification, the input data set should be aligned to that of the reference data set. This function aligns these data sets.

Usage

.sits_timeline_match(timeline, ref_start_date, ref_end_date, num_samples)

Arguments

timeline

timeline of input observations (vector).

ref_start_date

reference for starting the classification.

ref_end_date

reference for end the classification.

num_samples

number of samples.

Value

A list of breaks that will be applied to the input data set.

Examples

Run this code
# NOT RUN {
# get a timeline for MODIS data
data("timeline_2000_2017")
# get a set of subsets for a period of 10 years
ref_start_date <- lubridate::ymd("2000-08-28")
ref_end_date <- lubridate::ymd("2000-08-13")
nsamples <- 23
dates <- sits:::.sits_timeline_match(timeline_2000_2017,
                 ref_start_date, ref_end_date, nsamples)
# }

Run the code above in your browser using DataLab