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... | |
te::dt::DateTimePeriod * | getTemporalExtent () const |
It returns the temporal extent of the time series observations. More... | |
std::auto_ptr< TimeSeries > | getTimeSeries (te::st::AbstractTimeSeriesInterp *interp) |
It returns the time series from the DataSet. More... | |
std::auto_ptr< TimeSeries > | getTimeSeries (int idx, te::st::AbstractTimeSeriesInterp *interp) |
It returns the time series from the DataSet. More... | |
void | getTimeSeriesSet (te::st::AbstractTimeSeriesInterp *interp, std::vector< te::st::TimeSeries * > &result) |
It returns all time series from the DataSet. More... | |
const TimeSeriesDataSetType & | getType () const |
It returns a reference to the internal time series data set type. More... | |
void | setId (const std::string &id) |
It sets the identifier associated to the time series. More... | |
std::size_t | size () const |
It returns the size of the time series observation set. More... | |
virtual | ~TimeSeriesDataSet () |
It returns the trajectory geometry property. More... | |
Constructor | |
TimeSeriesDataSet (te::da::DataSet *ds, int tPropIdx, int vPropIdx, int gPropIdx, int idPropIdx, const std::string &id) | |
Constructor. More... | |
TimeSeriesDataSet (te::da::DataSet *ds, int tPropIdx, int vPropIdx, int gPropIdx, int idPropIdx, const std::string &id, te::dt::DateTimePeriod *text) | |
Constructor. More... | |
TimeSeriesDataSet (te::da::DataSet *ds, const std::vector< int > &tPropIdxs, const std::vector< int > &vPropIdxs, int gPropIdx, int idPropIdx, const std::string &id) | |
Constructor. More... | |
TimeSeriesDataSet (te::da::DataSet *ds, const std::vector< int > &tPropIdxs, const std::vector< int > &vPropIdxs, int gPropIdx, int idPropIdx, const std::string &id, te::dt::DateTimePeriod *text) | |
Constructor. More... | |
TimeSeriesDataSet (te::da::DataSet *ds, const TimeSeriesDataSetType &type, te::dt::DateTimePeriod *text) | |
Constructor. More... | |
TimeSeriesDataSet (ObservationDataSet *obs, const TimeSeriesDataSetType &type, const std::string &id) | |
Constructor. 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. | |
It returns the time pointed by the internal cursor. /*!
| |
std::auto_ptr< te::dt::DateTime > | getTime () const |
std::auto_ptr < te::dt::AbstractData > | getValue (std::size_t idx) const |
It returns the idx-th observed value pointed by the internal cursor. More... | |
std::auto_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::auto_ptr< te::gm::Geometry > | getGeometry () const |
It returns the geometry pointed by the internal cursor. More... | |
Protected Member Functions | |
std::auto_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 trajectory identification. More... | |
std::auto_ptr< ObservationDataSet > | m_obsDs |
The data set that contains the trajectory observations. More... | |
TimeSeriesDataSetType | m_type |
The trajectory type. 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, |
int | tPropIdx, | ||
int | vPropIdx, | ||
int | gPropIdx, | ||
int | idPropIdx, | ||
const std::string & | id | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
tPropIdx | The index of the property that contains the times of time series. |
vPropIdx | The index of the property that contains the values of time series. |
gPropIdx | The index of the property that contains the location of time series. |
idPropIdx | The index of the property that contains the identity of the time series. |
id | The time series id. |
Definition at line 42 of file TimeSeriesDataSet.cpp.
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
int | tPropIdx, | ||
int | vPropIdx, | ||
int | gPropIdx, | ||
int | idPropIdx, | ||
const std::string & | id, | ||
te::dt::DateTimePeriod * | text | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
tPropIdx | The index of the property that contains the times of time series. |
vPropIdx | The index of the property that contains the values of time series. |
gPropIdx | The index of the property that contains the location of time series. |
idPropIdx | The index of the property that contains the identity of the time series. |
id | The time series id. |
text | The temporal extent. |
Definition at line 50 of file TimeSeriesDataSet.cpp.
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
const std::vector< int > & | tPropIdxs, | ||
const std::vector< int > & | vPropIdxs, | ||
int | gPropIdx, | ||
int | idPropIdx, | ||
const std::string & | id | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
tPropIdxs | The indexes of the properties that contain the begin and end times of time series. |
vPropIdxs | The indexes of the properties that contain the values of time series. |
gPropIdx | The index of the property that contains the location of time series. |
idPropIdx | The index of the property that contains the identity of the time series. |
id | The time series id. |
Definition at line 58 of file TimeSeriesDataSet.cpp.
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
const std::vector< int > & | tPropIdxs, | ||
const std::vector< int > & | vPropIdxs, | ||
int | gPropIdx, | ||
int | idPropIdx, | ||
const std::string & | id, | ||
te::dt::DateTimePeriod * | text | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
tPropIdxs | The indexes of the properties that contain the begin and end times of time series. |
vPropIdxs | The indexes of the properties that contain the values of time series. |
gPropIdx | The index of the property that contains the location of time series. |
idPropIdx | The index of the property that contains the identity of the time series. |
id | The time series id. |
text | The temporal extent. |
Definition at line 67 of file TimeSeriesDataSet.cpp.
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
const TimeSeriesDataSetType & | type, | ||
te::dt::DateTimePeriod * | text | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
type | The time series data set type. |
text | The temporal extent. |
Definition at line 76 of file TimeSeriesDataSet.cpp.
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | ObservationDataSet * | obs, |
const TimeSeriesDataSetType & | type, | ||
const std::string & | id | ||
) |
Constructor.
obs | The data set that contains the time series observations. |
type | The time series data set type. |
id | The time series id |
Definition at line 85 of file TimeSeriesDataSet.cpp.
|
virtual |
It returns the trajectory geometry property.
It returns the trajectory datetime property.
Virtual destructor.
Definition at line 294 of file TimeSeriesDataSet.cpp.
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 180 of file TimeSeriesDataSet.cpp.
double te::st::TimeSeriesDataSet::getDouble | ( | ) | const |
It returns the observed value as double pointed by the internal cursor.
Definition at line 185 of file TimeSeriesDataSet.cpp.
std::auto_ptr< te::gm::Geometry > te::st::TimeSeriesDataSet::getGeometry | ( | ) | const |
It returns the geometry pointed by the internal cursor.
Definition at line 200 of file TimeSeriesDataSet.cpp.
std::string te::st::TimeSeriesDataSet::getId | ( | ) | const |
It returns the identifier associated to the time series.
Definition at line 103 of file TimeSeriesDataSet.cpp.
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 190 of file TimeSeriesDataSet.cpp.
int te::st::TimeSeriesDataSet::getInt | ( | ) | const |
It returns the observed value as double pointed by the internal cursor.
Definition at line 195 of file TimeSeriesDataSet.cpp.
te::st::ObservationDataSet * te::st::TimeSeriesDataSet::getObservationSet | ( | ) | const |
It returns the data set that contains the time series observations.
Definition at line 93 of file TimeSeriesDataSet.cpp.
te::dt::DateTimePeriod * te::st::TimeSeriesDataSet::getTemporalExtent | ( | ) | const |
It returns the temporal extent of the time series observations.
Definition at line 205 of file TimeSeriesDataSet.cpp.
std::auto_ptr< te::dt::DateTime > te::st::TimeSeriesDataSet::getTime | ( | ) | const |
Definition at line 163 of file TimeSeriesDataSet.cpp.
std::auto_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 210 of file TimeSeriesDataSet.cpp.
std::auto_ptr< te::st::TimeSeries > te::st::TimeSeriesDataSet::getTimeSeries | ( | int | idx, |
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.
idx | The index of the observed property to be considered |
interp | The time series interpolator. |
Definition at line 215 of file TimeSeriesDataSet.cpp.
References te::da::DataSet::getDateTime(), te::da::DataSet::getGeometry(), te::da::DataSet::getValue(), and te::da::DataSet::moveNext().
void te::st::TimeSeriesDataSet::getTimeSeriesSet | ( | te::st::AbstractTimeSeriesInterp * | interp, |
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. |
result | The returned set of time series. |
Definition at line 245 of file TimeSeriesDataSet.cpp.
References te::da::DataSet::getDateTime(), te::da::DataSet::getGeometry(), te::da::DataSet::getValue(), and te::da::DataSet::moveNext().
const te::st::TimeSeriesDataSetType & te::st::TimeSeriesDataSet::getType | ( | ) | const |
It returns a reference to the internal time series data set type.
Definition at line 98 of file TimeSeriesDataSet.cpp.
std::auto_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 170 of file TimeSeriesDataSet.cpp.
std::auto_ptr< te::dt::AbstractData > te::st::TimeSeriesDataSet::getValue | ( | ) | const |
It returns the observed value pointed by the internal cursor.
Definition at line 175 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::isAfterEnd | ( | ) | const |
Definition at line 158 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::isAtBegin | ( | ) | const |
Definition at line 143 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::isAtEnd | ( | ) | const |
Definition at line 153 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::isBeforeBegin | ( | ) | const |
Definition at line 148 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::moveBeforeFirst | ( | ) |
Definition at line 133 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::moveFirst | ( | ) |
Definition at line 128 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::moveLast | ( | ) |
Definition at line 138 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::moveNext | ( | ) |
Definition at line 118 of file TimeSeriesDataSet.cpp.
bool te::st::TimeSeriesDataSet::movePrevious | ( | ) |
Definition at line 123 of file TimeSeriesDataSet.cpp.
|
protected |
It releases all internal pointers, returning its internal DataSet and invalidating itself.
Definition at line 288 of file TimeSeriesDataSet.cpp.
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 108 of file TimeSeriesDataSet.cpp.
std::size_t te::st::TimeSeriesDataSet::size | ( | void | ) | const |
It returns the size of the time series observation set.
Definition at line 113 of file TimeSeriesDataSet.cpp.
|
friend |
Definition at line 71 of file TimeSeriesDataSet.h.
|
private |
The trajectory identification.
Definition at line 382 of file TimeSeriesDataSet.h.
|
private |
The data set that contains the trajectory observations.
Definition at line 380 of file TimeSeriesDataSet.h.
|
private |
The trajectory type.
Definition at line 381 of file TimeSeriesDataSet.h.