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" 40 #include "../interpolator/NearestGeometryAtTimeInterp.h" 50 const std::string&
id)
79 return m_obsDs->getData()->size();
99 return m_obsDs->moveBeforeFirst();
114 return m_obsDs->isBeforeBegin();
129 if(!
m_obsDs->getType().hasGeomProp())
130 return std::unique_ptr<te::gm::Geometry>();
131 return std::unique_ptr<te::gm::Geometry>(
m_obsDs->getData()->getGeometry(
m_obsDs->getType().getGeomPropName()));
137 std::string phTimePropName =
m_obsDs->getType().getBeginTimePropName();
138 return std::unique_ptr<te::dt::DateTime>(
m_obsDs->getData()->getDateTime(phTimePropName));
143 return m_obsDs->getType().getTemporalExtent();
148 return m_obsDs->getType().getSpatialExtent();
157 std::unique_ptr<te::dt::DateTime> time(ds->
getDateTime(
m_obsDs->getType().getBeginTimePropName()));
158 std::unique_ptr<te::gm::Geometry> geom(ds->
getGeometry(
m_obsDs->getType().getGeomPropName()));
159 result->
add(time.release(), geom.release());
161 return std::unique_ptr<te::st::Trajectory>(result);
171 std::unique_ptr<te::da::DataSet> result(
m_obsDs->release());
virtual std::unique_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 trajectory.
bool isBeforeBegin() const
const te::dt::DateTimePeriod * getTemporalExtent() const
It returns the temporal extent of the trajectory observations.
A class to represent a DataSet that contains observations.
std::string m_id
The trajectory identification.
void setId(const std::string &id)
It sets the identifier associated to the trajectory.
static te::dt::Date ds(2010, 01, 01)
std::unique_ptr< ObservationDataSet > m_obsDs
The data set that contains the trajectory observations.
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
An abstract class for an interpolation function or interpolator that estimates geometries at non-obse...
std::string getId() const
It returns the identifier associated to the trajectory.
std::unique_ptr< Trajectory > getTrajectory()
It returns the trajectory from the DataSet.
static NearestGeometryAtTimeInterp & getInstance()
It returns a reference to the singleton instance.
virtual ~TrajectoryDataSet()
Virtual destructor.
std::unique_ptr< te::dt::DateTime > getTime() const
It returns the time pointed by the internal cursor.
const te::gm::Geometry * getSpatialExtent() const
It returns the spatial extent of the trajectory observations.
TrajectoryDataSet(te::da::DataSet *ds, const ObservationDataSetType &type)
Constructor.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
virtual std::unique_ptr< te::dt::DateTime > getDateTime(std::size_t i) const =0
Method for retrieving a date and time attribute value.
A dataset is the unit of information manipulated by the data access module of TerraLib.
ObservationDataSet * getObservationSet() const
It returns the data set that contains the trajectory observations.
std::unique_ptr< te::gm::Geometry > getGeometry() const
It returns the geometry pointed by the internal cursor.
An abstract class to represent a period of date and time.
std::unique_ptr< te::da::DataSet > release()
It releases all internal pointers, returning its internal DataSet and invalidating itself...
A class that contains complemental DataSetType information about a DataSet that holds observations...
A class to represent trajectory.
void add(te::dt::DateTime *time, te::gm::Geometry *geom)
It adds an observation (time and geometry) into the trajectory.
std::size_t size() const
It returns the size of the trajectory observation set.
This file contains a class to represent a trajectory data set.