27 #include "../../../dataaccess/dataset/DataSet.h" 
   28 #include "../../../datatype/DateTime.h" 
   29 #include "../../../datatype/DateTimePeriod.h" 
   30 #include "../../../datatype/DateTimeInstant.h" 
   31 #include "../../../datatype/SimpleData.h" 
   32 #include "../../../geometry/Geometry.h" 
   33 #include "../../../geometry/Utils.h" 
   38 #include "../observation/ObservationDataSet.h" 
   39 #include "../observation/ObservationDataSetType.h" 
   43                                               int idPropIdx, 
const std::string& 
id)
 
   45   m_type(tPropIdx, vPropIdx, gPropIdx, idPropIdx, id),
 
   53   m_type(tPropIdx, vPropIdx, gPropIdx, idPropIdx, id),
 
   59                           const std::vector<int>& vPropIdxs, 
 
   60                           int gPropIdx, 
int idPropIdx, 
const std::string& 
id)
 
   62   m_type(tPropIdxs, vPropIdxs, gPropIdx, idPropIdx, id),
 
   68                           const std::vector<int>& vPropIdxs, 
int gPropIdx, 
int idPropIdx, 
 
   71   m_type(tPropIdxs, vPropIdxs, gPropIdx, idPropIdx, id),
 
  115   return m_obsDs->getData()->size();
 
  120   return m_obsDs->moveNext();
 
  125   return m_obsDs->movePrevious();
 
  130   return m_obsDs->moveFirst();
 
  135   return m_obsDs->moveBeforeFirst();
 
  140   return m_obsDs->moveLast();
 
  145   return m_obsDs->isAtBegin();
 
  150   return m_obsDs->isBeforeBegin();
 
  155   return m_obsDs->isAtEnd();
 
  160   return m_obsDs->isAfterEnd();
 
  166   int phTimePropIdx = m_type.getBeginTimePropIdx();
 
  167   return std::auto_ptr<te::dt::DateTime>(m_obsDs->getData()->getDateTime(phTimePropIdx));
 
  172   return std::auto_ptr<te::dt::AbstractData>(m_obsDs->getData()->getValue(idx));
 
  177   return std::auto_ptr<te::dt::AbstractData>(m_obsDs->getData()->getValue(m_type.getValuePropIdx()[0]));
 
  182   return m_obsDs->getData()->getDouble(idx);
 
  187   return m_obsDs->getData()->getDouble(m_type.getValuePropIdx()[0]);
 
  192   return m_obsDs->getData()->getInt32(idx);
 
  197   return m_obsDs->getData()->getInt32(m_type.getValuePropIdx()[0]);
 
  202   return std::auto_ptr<te::gm::Geometry>(m_obsDs->getData()->getGeometry(m_type.getGeomPropIdx()));
 
  207   return m_obsDs->getTemporalExtent();
 
  212   return std::auto_ptr<te::st::TimeSeries>(getTimeSeries(m_type.getValuePropIdx()[0],interp));
 
  217   std::auto_ptr<te::st::TimeSeries> result(
new TimeSeries(interp,m_id));
 
  223     if(m_type.getGeomPropIdx()>-1)
 
  225       std::auto_ptr<te::gm::Geometry> geom(ds->
getGeometry(m_type.getGeomPropIdx()));
 
  226       result->setLocation(geom.release());
 
  230     std::auto_ptr<te::dt::DateTime> time(ds->
getDateTime(m_type.getBeginTimePropIdx()));
 
  231     std::auto_ptr<te::dt::AbstractData> value(ds->
getValue(idx));
 
  232     result->add(time.release(), value.release());
 
  238     std::auto_ptr<te::dt::DateTime> time(ds->
getDateTime(m_type.getBeginTimePropIdx()));
 
  239     std::auto_ptr<te::dt::AbstractData> value(ds->
getValue(idx));
 
  240     result->add(time.release(), value.release());
 
  246                                 std::vector<te::st::TimeSeries*>& result)
 
  248   std::size_t sz = m_type.getValuePropIdx().size();
 
  249   for(
unsigned int i = 0; i<sz; ++i)
 
  252     result.push_back(ts);
 
  259     for(
unsigned int i = 0; i<sz; ++i)
 
  262       if(m_type.getGeomPropIdx()>-1)
 
  264         std::auto_ptr<te::gm::Geometry> geom(ds->
getGeometry(m_type.getGeomPropIdx()));
 
  265         result[i]->setLocation(geom.release());
 
  269       std::auto_ptr<te::dt::DateTime> time(ds->
getDateTime(m_type.getBeginTimePropIdx()));
 
  270       std::auto_ptr<te::dt::AbstractData> value(ds->
getValue(m_type.getValuePropIdx()[i]));
 
  271       result[i]->add(time.release(), value.release());
 
  277     for(
unsigned int i = 0; i<sz; ++i)
 
  280       std::auto_ptr<te::dt::DateTime> time(ds->
getDateTime(m_type.getBeginTimePropIdx()));
 
  281       std::auto_ptr<te::dt::AbstractData> value(ds->
getValue(m_type.getValuePropIdx()[i]));
 
  282       result[i]->add(time.release(), value.release());
 
void setId(const std::string &id)
It sets the identifier associated to the time series. 
 
ObservationDataSet * getObservationSet() const 
It returns the data set that contains the time series observations. 
 
const TimeSeriesDataSetType & getType() const 
It returns a reference to the internal time series data set type. 
 
This file contains a class to represent a time series data set. 
 
virtual std::auto_ptr< te::dt::DateTime > getDateTime(std::size_t i) const =0
Method for retrieving a date and time attribute value. 
 
int getInt() const 
It returns the observed value as double pointed by the internal cursor. 
 
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection. 
 
std::auto_ptr< te::dt::AbstractData > getValue() const 
It returns the observed value pointed by the internal cursor. 
 
void getTimeSeriesSet(te::st::AbstractTimeSeriesInterp *interp, std::vector< te::st::TimeSeries * > &result)
It returns all time series from the DataSet. 
 
A class to represent a DataSet that contains observations. 
 
std::auto_ptr< te::dt::DateTime > getTime() const 
 
virtual ~TimeSeriesDataSet()
It returns the trajectory geometry property. 
 
An abstract class to represent a period of date and time. 
 
std::auto_ptr< TimeSeries > getTimeSeries(te::st::AbstractTimeSeriesInterp *interp)
It returns the time series from the DataSet. 
 
std::auto_ptr< te::gm::Geometry > getGeometry() const 
It returns the geometry pointed by the internal cursor. 
 
double getDouble() const 
It returns the observed value as double pointed by the internal cursor. 
 
virtual std::auto_ptr< te::dt::AbstractData > getValue(std::size_t i) const 
Method for retrieving any other type of data value stored in the data source. 
 
std::string getId() const 
It returns the identifier associated to the time series. 
 
An abstract class for an interpolation function or interpolator that estimate a value at non-observav...
 
bool isBeforeBegin() const 
 
A class to represent time series. 
 
TimeSeriesDataSet(te::da::DataSet *ds, int tPropIdx, int vPropIdx, int gPropIdx, int idPropIdx, const std::string &id)
Constructor. 
 
A class that contains complemental information about a DataSet that holds observations of a time seri...
 
virtual std::auto_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value. 
 
This file contains a class to represent a time series. 
 
std::size_t size() const 
It returns the size of the time series observation set. 
 
A dataset is the unit of information manipulated by the data access module of TerraLib. 
 
te::dt::DateTimePeriod * getTemporalExtent() const 
It returns the temporal extent of the time series observations.