A class to represent a time series data set. More...
#include <TimeSeriesDataSet.h>
Public Member Functions | |
| std::string | getId () const |
| It returns the identifier associated to the time series. More... | |
| ObservationDataSet * | getObservationSet () const |
| It returns the data set that contains the time series observations. More... | |
| const te::dt::DateTimePeriod * | getTemporalExtent () const |
| It returns the temporal extent of the time series observations. More... | |
| std::unique_ptr< TimeSeries > | getTimeSeries (te::st::AbstractTimeSeriesInterp *interp) |
| It returns the time series from the DataSet. More... | |
| std::unique_ptr< TimeSeries > | getTimeSeries (const std::string &propName, te::st::AbstractTimeSeriesInterp *interp) |
| It returns the time series from the DataSet. More... | |
| void | getTimeSeriesSet (te::st::AbstractTimeSeriesInterp *interp, const std::string &vPropName, std::vector< te::st::TimeSeries * > &result) |
| It returns all time series from the DataSet. More... | |
| const std::vector< std::string > & | getValuePropNames () const |
| It returns the indexes of the DataSet properties that contains the values associated to the time series. More... | |
| void | setId (const std::string &id) |
| It sets the identifier associated to the time series. More... | |
| void | setValuePropNames (const std::vector< std::string > &n) |
| It sets the names of the DataSet properties that contains the values associated to the time series. More... | |
| std::size_t | size () const |
| It returns the size of the time series observation set. More... | |
| TimeSeriesDataSet (te::da::DataSet *ds, const ObservationDataSetType &type, const std::vector< std::string > &propNames) | |
| Constructor. More... | |
| TimeSeriesDataSet (te::da::DataSet *ds, const ObservationDataSetType &type, const std::vector< std::string > &propNames, const std::string &id) | |
| Constructor. More... | |
| TimeSeriesDataSet (ObservationDataSet *obs, const std::vector< std::string > &propNames, const std::string &id) | |
| Constructor. More... | |
| virtual | ~TimeSeriesDataSet () |
| It returns the trajectory geometry property. More... | |
Methods to traverse the trajectory observations and to check the | |
internal cursor pointer | |
| bool | moveNext () |
| bool | movePrevious () |
| bool | moveFirst () |
| bool | moveBeforeFirst () |
| bool | moveLast () |
| bool | isAtBegin () const |
| bool | isBeforeBegin () const |
| bool | isAtEnd () const |
| bool | isAfterEnd () const |
Methods to get values pointed by the internal cursor. | |
| std::unique_ptr< te::dt::DateTime > | getTime () const |
| It returns the time pointed by the internal cursor. More... | |
| std::unique_ptr< te::dt::AbstractData > | getValue (std::size_t idx) const |
| It returns the idx-th observed value pointed by the internal cursor. More... | |
| std::unique_ptr< te::dt::AbstractData > | getValue () const |
| It returns the observed value pointed by the internal cursor. More... | |
| double | getDouble (std::size_t idx) const |
| It returns the idx-th observed value as double pointed by the internal cursor. More... | |
| double | getDouble () const |
| It returns the observed value as double pointed by the internal cursor. More... | |
| int | getInt (std::size_t idx) const |
| It returns the idx-th observed value as integer pointed by the internal cursor. More... | |
| int | getInt () const |
| It returns the observed value as double pointed by the internal cursor. More... | |
| std::unique_ptr< te::gm::Geometry > | getGeometry () const |
| It returns the geometry pointed by the internal cursor. More... | |
Protected Member Functions | |
| std::unique_ptr< te::da::DataSet > | release () |
| It releases all internal pointers, returning its internal DataSet and invalidating itself. More... | |
Private Attributes | |
| std::string | m_id |
| The time series identification. More... | |
| std::unique_ptr< ObservationDataSet > | m_obsDs |
| The data set that contains the trajectory observations. More... | |
| std::vector< std::string > | m_vlPropNames |
| The names of the properties that contain the time series values. More... | |
Friends | |
| class | TimeSeriesDataSetLayer |
A class to represent a time series data set.
This class represents a view on a DataSet that contains observations of time series. A time series represents the variation of the values of a property over time.
A TimeSeriesDataSet can contain one or more properties observed over time.
Definition at line 69 of file TimeSeriesDataSet.h.
| te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
| const ObservationDataSetType & | type, | ||
| const std::vector< std::string > & | propNames | ||
| ) |
Constructor.
| ds | The data set that contains the time series observations. |
| type | The observation data set type. |
| propNames | The names of the properties that contains the time series values |
Definition at line 43 of file TimeSeriesDataSet.cpp.
| te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
| const ObservationDataSetType & | type, | ||
| const std::vector< std::string > & | propNames, | ||
| const std::string & | id | ||
| ) |
Constructor.
| ds | The data set that contains the time series observations. |
| type | The observation data set type. |
| propNames | The names of the properties that contains the time series values |
| id | The time series id |
Definition at line 51 of file TimeSeriesDataSet.cpp.
| te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | ObservationDataSet * | obs, |
| const std::vector< std::string > & | propNames, | ||
| const std::string & | id | ||
| ) |
Constructor.
| obs | The data set that contains the time series observations. |
| propNames | The names of the properties that contains the time series values |
| id | The time series id |
Definition at line 59 of file TimeSeriesDataSet.cpp.
|
virtualdefault |
It returns the trajectory geometry property.
It returns the trajectory datetime property.
Virtual destructor.
Referenced by release().
| double te::st::TimeSeriesDataSet::getDouble | ( | std::size_t | idx | ) | const |
It returns the idx-th observed value as double pointed by the internal cursor.
Definition at line 159 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| double te::st::TimeSeriesDataSet::getDouble | ( | ) | const |
It returns the observed value as double pointed by the internal cursor.
Definition at line 164 of file TimeSeriesDataSet.cpp.
References m_obsDs, and m_vlPropNames.
| std::unique_ptr< te::gm::Geometry > te::st::TimeSeriesDataSet::getGeometry | ( | ) | const |
It returns the geometry pointed by the internal cursor.
Definition at line 179 of file TimeSeriesDataSet.cpp.
References m_obsDs.
Referenced by getTimeSeries(), and getTimeSeriesSet().
| std::string te::st::TimeSeriesDataSet::getId | ( | ) | const |
It returns the identifier associated to the time series.
Definition at line 82 of file TimeSeriesDataSet.cpp.
References m_id.
| int te::st::TimeSeriesDataSet::getInt | ( | std::size_t | idx | ) | const |
It returns the idx-th observed value as integer pointed by the internal cursor.
Definition at line 169 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| int te::st::TimeSeriesDataSet::getInt | ( | ) | const |
It returns the observed value as double pointed by the internal cursor.
Definition at line 174 of file TimeSeriesDataSet.cpp.
References m_obsDs, and m_vlPropNames.
| te::st::ObservationDataSet * te::st::TimeSeriesDataSet::getObservationSet | ( | ) | const |
It returns the data set that contains the time series observations.
Definition at line 67 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| const te::dt::DateTimePeriod * te::st::TimeSeriesDataSet::getTemporalExtent | ( | ) | const |
It returns the temporal extent of the time series observations.
Definition at line 188 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| std::unique_ptr< te::dt::DateTime > te::st::TimeSeriesDataSet::getTime | ( | ) | const |
It returns the time pointed by the internal cursor.
Definition at line 142 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| std::unique_ptr< te::st::TimeSeries > te::st::TimeSeriesDataSet::getTimeSeries | ( | te::st::AbstractTimeSeriesInterp * | interp | ) |
It returns the time series from the DataSet.
This method encapsulates all observations of this DataSet as a TimeSeries type associated to a given interpolator.
| interp | The time series interpolator. |
Definition at line 193 of file TimeSeriesDataSet.cpp.
References m_vlPropNames.
| std::unique_ptr< te::st::TimeSeries > te::st::TimeSeriesDataSet::getTimeSeries | ( | const std::string & | propName, |
| te::st::AbstractTimeSeriesInterp * | interp | ||
| ) |
It returns the time series from the DataSet.
This method encapsulates all observations of this DataSet as a TimeSeries type associated to a given interpolator.
| propName | The name of the observed property to be considered |
| interp | The time series interpolator. |
Definition at line 199 of file TimeSeriesDataSet.cpp.
References ds, te::da::DataSet::getDateTime(), getGeometry(), te::da::DataSet::getValue(), m_id, m_obsDs, and te::da::DataSet::moveNext().
| void te::st::TimeSeriesDataSet::getTimeSeriesSet | ( | te::st::AbstractTimeSeriesInterp * | interp, |
| const std::string & | vPropName, | ||
| std::vector< te::st::TimeSeries * > & | result | ||
| ) |
It returns all time series from the DataSet.
This method encapsulates all observations of this DataSet as a set of TimeSeries associated to a given interpolator.
| interp | The time series interpolator. |
| vPropName | The property name that contains the attribute values associated to a time series |
| result | The returned set of time series. |
Definition at line 231 of file TimeSeriesDataSet.cpp.
References te::st::TimeSeries::add(), ds, te::da::DataSet::getDateTime(), getGeometry(), te::da::DataSet::getValue(), m_obsDs, m_vlPropNames, te::da::DataSet::moveBeforeFirst(), and te::da::DataSet::moveNext().
| std::unique_ptr< te::dt::AbstractData > te::st::TimeSeriesDataSet::getValue | ( | std::size_t | idx | ) | const |
It returns the idx-th observed value pointed by the internal cursor.
Definition at line 149 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| std::unique_ptr< te::dt::AbstractData > te::st::TimeSeriesDataSet::getValue | ( | ) | const |
It returns the observed value pointed by the internal cursor.
Definition at line 154 of file TimeSeriesDataSet.cpp.
References m_obsDs, and m_vlPropNames.
| const std::vector< std::string > & te::st::TimeSeriesDataSet::getValuePropNames | ( | ) | const |
It returns the indexes of the DataSet properties that contains the values associated to the time series.
Definition at line 72 of file TimeSeriesDataSet.cpp.
References m_vlPropNames.
| bool te::st::TimeSeriesDataSet::isAfterEnd | ( | ) | const |
Definition at line 137 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::isAtBegin | ( | ) | const |
Definition at line 122 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::isAtEnd | ( | ) | const |
Definition at line 132 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::isBeforeBegin | ( | ) | const |
Definition at line 127 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::moveBeforeFirst | ( | ) |
Definition at line 112 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::moveFirst | ( | ) |
Definition at line 107 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::moveLast | ( | ) |
Definition at line 117 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::moveNext | ( | ) |
Definition at line 97 of file TimeSeriesDataSet.cpp.
References m_obsDs.
| bool te::st::TimeSeriesDataSet::movePrevious | ( | ) |
Definition at line 102 of file TimeSeriesDataSet.cpp.
References m_obsDs.
|
protected |
It releases all internal pointers, returning its internal DataSet and invalidating itself.
Definition at line 270 of file TimeSeriesDataSet.cpp.
References m_obsDs, and ~TimeSeriesDataSet().
| void te::st::TimeSeriesDataSet::setId | ( | const std::string & | id | ) |
It sets the identifier associated to the time series.
| id | The identifier associated to the time series. |
Definition at line 87 of file TimeSeriesDataSet.cpp.
References m_id.
| void te::st::TimeSeriesDataSet::setValuePropNames | ( | const std::vector< std::string > & | n | ) |
It sets the names of the DataSet properties that contains the values associated to the time series.
| n | The names of the DataSet properties that contains the time series values. |
Definition at line 77 of file TimeSeriesDataSet.cpp.
References m_vlPropNames.
| std::size_t te::st::TimeSeriesDataSet::size | ( | void | ) | const |
It returns the size of the time series observation set.
Definition at line 92 of file TimeSeriesDataSet.cpp.
References m_obsDs.
|
friend |
Definition at line 71 of file TimeSeriesDataSet.h.
|
private |
The time series identification.
Definition at line 340 of file TimeSeriesDataSet.h.
Referenced by getId(), getTimeSeries(), and setId().
|
private |
The data set that contains the trajectory observations.
Definition at line 338 of file TimeSeriesDataSet.h.
Referenced by getDouble(), getGeometry(), getInt(), getObservationSet(), getTemporalExtent(), getTime(), getTimeSeries(), getTimeSeriesSet(), getValue(), isAfterEnd(), isAtBegin(), isAtEnd(), isBeforeBegin(), moveBeforeFirst(), moveFirst(), moveLast(), moveNext(), movePrevious(), release(), and size().
|
private |
The names of the properties that contain the time series values.
Definition at line 339 of file TimeSeriesDataSet.h.
Referenced by getDouble(), getInt(), getTimeSeries(), getTimeSeriesSet(), getValue(), getValuePropNames(), and setValuePropNames().