Go to the documentation of this file.
26 #ifndef __TERRALIB_ST_INTERNAL_TRAJECTORY_H
27 #define __TERRALIB_ST_INTERNAL_TRAJECTORY_H
30 #include "../../../sam/rtree/Index.h"
33 #include "../../Config.h"
34 #include "../../Enums.h"
44 #include <boost/shared_ptr.hpp>
47 namespace te {
namespace dt {
class DateTime;
class DateTimePeriod; } }
48 namespace te {
namespace gm {
class Geometry;
class Envelope; } }
56 class AbstractTrajectoryInterp;
59 typedef boost::shared_ptr<te::sam::rtree::Index<te::dt::DateTime*> >
TjRTreeShrPtr;
137 const std::string&
id);
147 const std::string&
id);
365 std::vector<TrajectoryPatch>& result)
const;
377 std::vector<TrajectoryPatch>& result)
const;
397 std::vector<TrajectoryPatch>& result)
const;
417 std::vector<TrajectoryPatch>& result)
const;
431 const std::vector<TrajectoryPatch>& result)
const;
467 #endif // __TERRALIB_ST_INTERNAL_TRAJECTORY_H
void getPatches(const te::gm::Geometry &geom, te::st::SpatioTemporalRelation str, const std::vector< TrajectoryPatch > &result) const
It returns trajectory subsets that satisfy a given spatiotemporal relation.
An Envelope defines a 2D rectangular region.
std::unique_ptr< te::gm::Geometry > getGeometry(te::dt::DateTime *t) const
It returns the geometry associated to a given date and time.
Trajectory * clone() const
It returns a clone of this trajectory.
This file contains a typedef that defines observations of trajectory.
std::size_t size() const
It returns the size of the trajectory observations.
boost::shared_ptr< te::sam::rtree::Index< te::dt::DateTime * > > TjRTreeShrPtr
Trajectory(const TrajectoryPatch &patch, AbstractTrajectoryInterp *interp, const std::string &id)
It constructs a trajectory from a patch.
Trajectory(const TrajectoryObservationSet &obs, const std::string &id)
Constructor.
void add(te::dt::DateTime *time, te::gm::Geometry *geom)
It adds an observation (time and geometry) into the trajectory.
TrajectoryIterator at(te::dt::DateTime *t) const
It returns an iterator that points to an observation at a given time.
void getPatches(const te::gm::Geometry &geom, te::gm::SpatialRelation r, std::vector< TrajectoryPatch > &result) const
It returns trajectory subsets that satisfy a given spatial relation.
Trajectory(const Trajectory &tj)
Copy constructor.
This file contains a trajetory iterator.
void getPatches(const te::gm::Geometry &geom, te::gm::SpatialRelation sr, const te::dt::DateTime &dt, te::dt::TemporalRelation tr, std::vector< TrajectoryPatch > &result) const
It returns trajectory subsets that satisfy a given spatial and temporal relation.
std::string getId() const
It returns the trajectory id.
std::unique_ptr< TimeSeries > getDistance(const te::gm::Geometry &geom)
It returns the distance between the trajectory and a given geometry.
std::unique_ptr< te::dt::DateTimePeriod > getTemporalExtent() const
It returns the temporal extent of the trajectory observations.
std::pair< te::dt::DateTimeShrPtr, te::gm::GeometrySharedPtr > TrajectoryObservation
TrajectoryObservationSet m_observations
The trajectory observations.
A struct to represent a patch or a continuous piece of a trajectory.
TrajectoryIterator begin() const
It returns an iterator that points to the first observation of the trajectory.
void add(const TrajectoryObservation &p)
It adds an observation (time and geometry) into the trajectory.
Trajectory()
Empty constructor.
TjRTreeShrPtr m_rtree
The RTree to index the trajectory geometries.
std::string m_id
The trajectory identification.
An abstract class for an interpolation function or interpolator that estimates geometries at non-obse...
SpatialRelation
Spatial relations between geometric objects.
SpatioTemporalRelation
An enum for the types of spatiotemporal relation.
A class to represent trajectory.
Trajectory(const std::string &id)
Empty constructor.
A class to traverse the observations of a trajectory.
AbstractTrajectoryInterp * getInterpolator() const
It returns the interpolator associated to the trajectory.
Trajectory & operator=(const Trajectory &other)
Copy assignment operator.
TrajectoryPatch getPatch(const te::dt::DateTime &dt, te::dt::TemporalRelation r=te::dt::DURING) const
It returns a trajectory subset that satisfies a given temporal relation.
Trajectory(const TrajectoryObservationSet &obs, AbstractTrajectoryInterp *interp, const std::string &id)
Constructor.
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
virtual ~Trajectory()
Virtual destructor.
std::unique_ptr< TimeSeries > getDistance(const Trajectory &other) const
It returns the distance between two trajectories.
te::gm::Envelope getSpatialExtent() const
It returns the spatial extent of the trajectory observations.
void getPatches(const te::gm::Envelope &g, te::gm::SpatialRelation r, std::vector< TrajectoryPatch > &result) const
It returns trajectory subsets that satisfy a given spatial relation.
std::map< te::dt::DateTimeShrPtr, te::gm::GeometrySharedPtr, CompareShrDateTime > TrajectoryObservationSet
void setId(const std::string &id)
It sets the trajectory id.
const TrajectoryObservationSet & getObservations() const
It returns the trajectory observations.
void setInterpolator(AbstractTrajectoryInterp *interp)
It sets the interpolator associated to the path.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
Trajectory(AbstractTrajectoryInterp *interp, const std::string &id)
Empty constructor.
void getPatches(const te::gm::Envelope &e, te::gm::SpatialRelation sr, const te::dt::DateTime &dt, te::dt::TemporalRelation tr, std::vector< TrajectoryPatch > &result) const
It returns trajectory subsets that satisfy a given spatial and temporal relation.
TrajectoryIterator end() const
It returns an iterator that points to the end of the trajectory.
AbstractTrajectoryInterp * m_interpolator
The interpolator used to estimate non-observed times.