26#ifndef __TERRALIB_ST_INTERNAL_TIMESERIES_H
27#define __TERRALIB_ST_INTERNAL_TIMESERIES_H
35#include "../../../datatype/Enums.h"
38#include "../../Config.h"
42namespace te {
namespace dt {
class AbstractData;
class DateTime;
class DateTimePeriod; } }
43namespace te {
namespace gm {
class Geometry; } }
50 class AbstractTimeSeriesInterp;
455 std::vector<TimeSeriesPatch>& result)
const;
493 std::vector<TimeSeriesPatch>& result)
const;
This file contains a time series iterator.
A base class for values that can be retrieved from the data access module.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
An abstract class for an interpolation function or interpolator that estimate a value at non-observav...
A class to traverse the observations of a TimeSeries.
A class to represent an observation (time and value) of a time series.
A class to represent time series.
TimeSeries(const TimeSeriesPatch &patch, AbstractTimeSeriesInterp *interp, const std::string &id, te::gm::Geometry *geom)
It constructs a time series from a patch.
void getPatches(const double &v, te::dt::BasicRelation r, const te::dt::DateTime &dt, te::dt::TemporalRelation tr, std::vector< TimeSeriesPatch > &result) const
It returns time series subsets that satisfy a given relation.
void getValueExtent(double &minValue, double &maxValue)
It returns the minimal and maximun values of the time series.
TimeSeries(AbstractTimeSeriesInterp *interp, const std::string &id)
Empty constructor.
TimeSeriesIterator at(te::dt::DateTime *t) const
It returns an iterator that points to an observation at a given time.
std::string m_id
The time series identification.
void getPatches(const double &v, te::dt::BasicRelation r, std::vector< TimeSeriesPatch > &result) const
It returns time series subsets that satisfy a given relation.
void add(te::dt::DateTime *time, int value)
It adds an observation (time and attribute value as integer) into the time series.
AbstractTimeSeriesInterp * m_interpolator
The interpolator used to estimate values at non-observed times.
std::size_t size() const
It returns the size of the time series observation set.
TimeSeries(const TimeSeriesObservationSet &obs, AbstractTimeSeriesInterp *interp, const std::string &id, te::gm::Geometry *geom)
Constructor.
std::unique_ptr< te::dt::AbstractData > getValue(te::dt::DateTime *t) const
It returns the value associated to a given date and time.
TimeSeriesPatch getPatch(const te::dt::DateTime &dt, te::dt::TemporalRelation r=te::dt::DURING) const
It returns a time series subset that satisfies a given temporal relation.
AbstractTimeSeriesInterp * getInterpolator() const
It returns the interpolator associated to the time series.
void add(te::dt::DateTime *time, const std::string &value)
It adds an observation (time and attribute value as string) into the time series.
int getInt(te::dt::DateTime *t) const
It returns the value as an integer associated to a given date and time.
TimeSeries & operator=(const TimeSeries &other)
Copy assignment operator.
void add(te::dt::DateTime *time, double value)
It adds an observation (time and attribute value as double) into the time series.
void setId(const std::string &id)
It sets the time series identifier.
std::unique_ptr< te::dt::DateTimePeriod > getTemporalExtent() const
It returns the temporal extent or range of the time series.
virtual ~TimeSeries()
It returns time series subsets that satisfy the given relations.
std::string getString(te::dt::DateTime *t) const
It returns the value as a string associated to a given date and time.
void add(te::dt::DateTime *time, te::dt::AbstractData *value)
It adds an observation (time and attribute value) into the time series.
std::string getId() const
It returns the time series identifier.
TimeSeries()
Empty constructor.
const TimeSeriesObservationSet & getObservations() const
It returns the time series observations.
TimeSeriesObservationSet m_observations
The time series observations.
void getValueExtent(int &minValue, int &maxValue)
It returns the minimal and maximun values of the time series.
std::unique_ptr< te::gm::Geometry > m_location
The time series location.
void setInterpolator(AbstractTimeSeriesInterp *interp)
It sets the interpolator associated to the time series.
TimeSeriesIterator end() const
It returns an iterator that points to the end of the time series.
void add(const TimeSeriesObservation &item)
It adds an observation (time and attribute value) into the time series.
double getDouble(te::dt::DateTime *t) const
It returns the value as a double associated to a given date and time.
TimeSeries(const std::string &id)
Empty constructor.
void getValueExtent(std::string &minValue, std::string &maxValue)
It returns the minimal and maximun values of the time series.
TimeSeriesIterator begin() const
It returns an iterator that points to the first observation of the time series.
TimeSeries(const TimeSeries &ts)
Copy constructor.
void getResultOrderedByTime(const double &v, te::dt::BasicRelation r, std::map< te::dt::DateTime *, te::dt::AbstractData *, te::dt::CompareDateTime > &result) const
It returns the result of a basic relation ordered by time.
TimeSeries(AbstractTimeSeriesInterp *interp, const std::string &id, te::gm::Geometry *geom)
Empty constructor.
te::gm::Geometry * getLocation() const
It returns the time series location.
void setLocation(te::gm::Geometry *geom)
It sets the time series location.
TimeSeries * clone() const
It returns a clone of this time series.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
BasicRelation
Relations between simple attribute values.
boost::multi_index_container< TimeSeriesObservation, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity< TimeSeriesObservation > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< TimeSeriesObservation, double, &TimeSeriesObservation::getDouble > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< TimeSeriesObservation, std::string, &TimeSeriesObservation::getString > > > > TimeSeriesObservationSet
A struct to represent a patch or a continuous piece of a time series.
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.