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