All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::st::CoverageSeries Class Reference

A class to represent a coverage series. More...

#include <CoverageSeries.h>

Public Member Functions

void add (te::dt::DateTime *time, te::st::Coverage *cv)
 It adds an observation (time and coverage) into the coverage series. More...
 
void add (const CoverageSeriesObservation &o)
 It adds an observation (time and coverage) into the coverage series. More...
 
 CoverageSeries ()
 A constructor. More...
 
 CoverageSeries (const CoverageSeriesObservationSet &obs, AbstractCoverageSeriesInterp *interp, te::gm::Geometry *se, CoverageType t)
 A constructor. More...
 
std::auto_ptr< te::st::CoveragegetCoverage (te::dt::DateTime *t) const
 It returns the coverage associated to a given date and time. More...
 
const
CoverageSeriesObservationSet
getObservations () const
 It returns the coverage series observations. More...
 
te::gm::GeometrygetSpatialExtent () const
 It returns the spatial extent of the coverage series. More...
 
std::auto_ptr
< te::dt::DateTimePeriod
getTemporalExtent () const
 It returns the temporal extent of the coverage series. More...
 
CoverageType getType () const
 It returns the type of the internal coverages. More...
 
std::size_t size () const
 It returns the size of the coverage series observations. More...
 
virtual ~CoverageSeries ()
 Virtual destructor. More...
 
CoverageSeries Iterator

An example of use:

CoverageSeriesIterator it = cvs.begin(); while(it!=cvs.end()) { DateTime* t = it.getTime(); Coverage* c = it.getCoverage(); ++it; }

CoverageSeriesIterator begin () const
 It returns an iterator that points to the first observation of the point coverage. More...
 
CoverageSeriesIterator end () const
 It returns an iterator that points to the end of the time series. More...
 
CoverageSeriesIterator at (te::dt::DateTime *t) const
 It returns an iterator that points to an observation at a given time. More...
 
Methods to return time series from the coverage series
std::auto_ptr< te::st::TimeSeriesgetTimeSeries (const te::gm::Point &l, unsigned int p=0) const
 It returns a time series of the p-th property associated to a given location. More...
 
void getTimeSeries (const te::gm::Point &l, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series associated to a given location. More...
 
void getTimeSeries (const te::gm::Polygon &l, unsigned int p, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series of the p-th property inside the given polygon. More...
 
void getTimeSeries (const te::gm::Envelope &e, unsigned int p, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series of the p-th property inside the given envelope. More...
 
void getTimeSeries (const te::gm::Polygon &l, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series inside the given polygon. More...
 
void getTimeSeries (const te::gm::Envelope &e, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series inside the given envelope. More...
 
std::auto_ptr< te::st::TimeSeriesgetTimeSeries (const te::gm::Point &l, const te::dt::DateTime &t, te::dt::TemporalRelation tr=te::dt::DURING, unsigned int p=0) const
 It returns a time series of the p-th property associated to a given location and considering a given temporal restriction. More...
 
void getTimeSeries (const te::gm::Point &l, const te::dt::DateTime &t, te::dt::TemporalRelation tr, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series associated to a given location and considering a given temporal restriction. More...
 
void getTimeSeries (const te::gm::Polygon &l, unsigned int p, const te::dt::DateTime &t, te::dt::TemporalRelation tr, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series of the p-th property inside the given polygon and considering a given temporal restriction. More...
 
void getTimeSeries (const te::gm::Envelope &e, unsigned int p, const te::dt::DateTime &t, te::dt::TemporalRelation tr, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series of the p-th property inside the given envelope and considering a given temporal restriction. More...
 
void getTimeSeries (const te::gm::Polygon &l, const te::dt::DateTime &t, te::dt::TemporalRelation tr, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series inside the given polygon and considering a given temporal restriction. More...
 
void getTimeSeries (const te::gm::Envelope &e, const te::dt::DateTime &t, te::dt::TemporalRelation tr, boost::ptr_vector< TimeSeries > &r) const
 It returns the time series inside the given envelope and considering a given temporal restriction. More...
 
Methods to return a subset or patch of a coverage series given a spatial and temporal restriction.
std::auto_ptr< CoverageSeriesgetPatch (const te::dt::DateTime &dt, te::dt::TemporalRelation r=te::dt::DURING) const
 It returns a subset or patch of the coverage series considering a given temporal restriction. More...
 
std::auto_ptr< CoverageSeriesgetPatch (const te::gm::Envelope &e, te::gm::SpatialRelation sr=te::gm::INTERSECTS) const
 It returns a subset or patch of the coverage series considering a given spatial restriction. More...
 
std::auto_ptr< CoverageSeriesgetPatch (const te::gm::Geometry &e, te::gm::SpatialRelation sr=te::gm::INTERSECTS) const
 It returns a subset or patch of the coverage series considering a given spatial restriction. More...
 
std::auto_ptr< CoverageSeriesgetPatch (const te::gm::Envelope &e, te::gm::SpatialRelation sr, const te::dt::DateTime &dt, te::dt::TemporalRelation r=te::dt::DURING) const
 It returns a subset or patch of the coverage series considering a given spatial and temporal restriction. More...
 
std::auto_ptr< CoverageSeriesgetPatch (const te::gm::Geometry &e, te::gm::SpatialRelation sr, const te::dt::DateTime &dt, te::dt::TemporalRelation tr=te::dt::DURING) const
 It returns a subset or patch of the coverage series considering a given spatial and temporal restriction. More...
 

Protected Attributes

CoverageType m_cvtype
 
AbstractCoverageSeriesInterpm_interpolator
 The coverage series observations. More...
 
CoverageSeriesObservationSet m_observations
 
std::auto_ptr< te::gm::Geometrym_sextent
 

Detailed Description

A class to represent a coverage series.

A coverage series is a sequence of coverages over time (T -> Coverage)

See also
Coverage RasterCoverage PointCoverage TimeSeries

Definition at line 72 of file CoverageSeries.h.

Constructor & Destructor Documentation

te::st::CoverageSeries::CoverageSeries ( )

A constructor.

Note
Internally, it will use the interpolator NearestCoverageAtTimeInterp

Definition at line 40 of file CoverageSeries.cpp.

te::st::CoverageSeries::CoverageSeries ( const CoverageSeriesObservationSet obs,
AbstractCoverageSeriesInterp interp,
te::gm::Geometry se,
CoverageType  t 
)

A constructor.

Parameters
obsThe coverage series observations
interpThe interpolator associated to the coverage series.
seThe coverage series spatial extent.
tThe type of the coverages that are in the observation set.
Note
It will take the ownership of the given pointers.

Definition at line 48 of file CoverageSeries.cpp.

te::st::CoverageSeries::~CoverageSeries ( )
virtual

Virtual destructor.

Definition at line 391 of file CoverageSeries.cpp.

Member Function Documentation

void te::st::CoverageSeries::add ( te::dt::DateTime time,
te::st::Coverage cv 
)

It adds an observation (time and coverage) into the coverage series.

Parameters
timeA pointer to the time.
cvA coverage.
Note
The caller will take the ownership of the given pointers.

Definition at line 80 of file CoverageSeries.cpp.

void te::st::CoverageSeries::add ( const CoverageSeriesObservation o)

It adds an observation (time and coverage) into the coverage series.

Parameters
oAn observation

Definition at line 88 of file CoverageSeries.cpp.

te::st::CoverageSeriesIterator te::st::CoverageSeries::at ( te::dt::DateTime t) const

It returns an iterator that points to an observation at a given time.

If there is no observation at this given time, the returned iterator points to the end of the coverage series.

Returns
The coverage series iterator.
Note
This does not take the ownership of the given pointer.

Definition at line 108 of file CoverageSeries.cpp.

References te::dt::AbstractData::clone().

te::st::CoverageSeriesIterator te::st::CoverageSeries::begin ( ) const

It returns an iterator that points to the first observation of the point coverage.

Returns
The coverage series iterator.

Definition at line 98 of file CoverageSeries.cpp.

te::st::CoverageSeriesIterator te::st::CoverageSeries::end ( ) const

It returns an iterator that points to the end of the time series.

Returns
The coverage series iterator.

Definition at line 103 of file CoverageSeries.cpp.

std::auto_ptr< te::st::Coverage > te::st::CoverageSeries::getCoverage ( te::dt::DateTime t) const

It returns the coverage associated to a given date and time.

If there is no coverage associated to the given date and time, it will use internally its interpolation function.

Parameters
tA date and time.
Returns
A pointer to the coverage associated to the given date and time.
Note
The caller will take the ownership of the returned pointer.
The caller will NOT take the ownership of the given date and time pointer.

Definition at line 116 of file CoverageSeries.cpp.

References te::dt::AbstractData::clone().

const te::st::CoverageSeriesObservationSet & te::st::CoverageSeries::getObservations ( ) const

It returns the coverage series observations.

Returns
A reference to the coverage series observations.

Definition at line 57 of file CoverageSeries.cpp.

Referenced by te::st::NearestCoverageAtTimeInterp::estimate().

std::auto_ptr< te::st::CoverageSeries > te::st::CoverageSeries::getPatch ( const te::dt::DateTime dt,
te::dt::TemporalRelation  r = te::dt::DURING 
) const

It returns a subset or patch of the coverage series considering a given temporal restriction.

Parameters
dtA given time
rA given temporal restriction
Note
The caller will take the ownership of the returned pointer.
The retorned coverage series will share the internal coverage pointers.

Definition at line 303 of file CoverageSeries.cpp.

References te::dt::AFTER, te::dt::BEFORE, te::dt::AbstractData::clone(), te::dt::DURING, te::dt::EQUALS, te::dt::DateTimePeriod::getFinalInstant(), and te::dt::DateTimePeriod::getInitialInstant().

std::auto_ptr< te::st::CoverageSeries > te::st::CoverageSeries::getPatch ( const te::gm::Envelope e,
te::gm::SpatialRelation  sr = te::gm::INTERSECTS 
) const

It returns a subset or patch of the coverage series considering a given spatial restriction.

Parameters
eA given envelope.
srA given spatial restriction
Note
The caller will take the ownership of the returned pointer.
The retorned coverage series will NOT share the internal coverage pointers.

Definition at line 364 of file CoverageSeries.cpp.

std::auto_ptr< te::st::CoverageSeries > te::st::CoverageSeries::getPatch ( const te::gm::Geometry e,
te::gm::SpatialRelation  sr = te::gm::INTERSECTS 
) const

It returns a subset or patch of the coverage series considering a given spatial restriction.

Parameters
eA given geometry.
srA given spatial restriction
Note
The caller will take the ownership of the returned pointer.
The retorned coverage series will NOT share the internal coverage pointers.

Definition at line 370 of file CoverageSeries.cpp.

std::auto_ptr< te::st::CoverageSeries > te::st::CoverageSeries::getPatch ( const te::gm::Envelope e,
te::gm::SpatialRelation  sr,
const te::dt::DateTime dt,
te::dt::TemporalRelation  r = te::dt::DURING 
) const

It returns a subset or patch of the coverage series considering a given spatial and temporal restriction.

Parameters
eA given envelope.
srA given spatial restriction
dtA given date and time
trA given temporal restriction
Note
The caller will take the ownership of the returned pointer.
The retorned coverage series will NOT share the internal coverage pointers.

Definition at line 377 of file CoverageSeries.cpp.

std::auto_ptr< te::st::CoverageSeries > te::st::CoverageSeries::getPatch ( const te::gm::Geometry e,
te::gm::SpatialRelation  sr,
const te::dt::DateTime dt,
te::dt::TemporalRelation  tr = te::dt::DURING 
) const

It returns a subset or patch of the coverage series considering a given spatial and temporal restriction.

Parameters
eA given geometry.
srA given spatial restriction
dtA given date and time
trA given temporal restriction
Note
The caller will take the ownership of the returned pointer.
The retorned coverage series will NOT share the internal coverage pointers.

Definition at line 385 of file CoverageSeries.cpp.

te::gm::Geometry * te::st::CoverageSeries::getSpatialExtent ( ) const

It returns the spatial extent of the coverage series.

Returns
Returns the coverage series spatial extent.
Note
The caller will NOT take the ownership of the returned geometry.

Definition at line 67 of file CoverageSeries.cpp.

std::auto_ptr< te::dt::DateTimePeriod > te::st::CoverageSeries::getTemporalExtent ( ) const

It returns the temporal extent of the coverage series.

Returns
Returns the coverage series temporal extent.
Note
The caller will take the ownership of the returned geometry.

Definition at line 72 of file CoverageSeries.cpp.

References te::dt::GetTemporalExtent().

std::auto_ptr< te::st::TimeSeries > te::st::CoverageSeries::getTimeSeries ( const te::gm::Point l,
unsigned int  p = 0 
) const

It returns a time series of the p-th property associated to a given location.

Parameters
lA given location.
pA given property or band
Returns
A pointer to the time series of the p-th property associated to a given location
Note
The caller will take the ownership of the returned pointer.
The caller will NOT take the ownership of the given date and time pointer.

Definition at line 127 of file CoverageSeries.cpp.

References te::gm::Point::clone().

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Point l,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series associated to a given location.

It returns a set of time series, one for each property of the coverage.

Parameters
lA given location.
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 143 of file CoverageSeries.cpp.

References te::gm::Point::clone().

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Polygon l,
unsigned int  p,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series of the p-th property inside the given polygon.

It returns a set of time series, one for each point inside the polygon

Parameters
lA given polygon.
pA given property.
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 169 of file CoverageSeries.cpp.

References te::gm::Polygon::clone().

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Envelope e,
unsigned int  p,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series of the p-th property inside the given envelope.

It returns a set of time series, one for each point inside the envelope

Parameters
lA given envelope.
pA given property.
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 205 of file CoverageSeries.cpp.

References te::gm::GetGeomFromEnvelope().

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Polygon l,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series inside the given polygon.

It returns a set of time series, one for each point inside the polygon and for each property of the coverage.

This method returns the time series of all properties of the coverages, ordered by locations.

An example, if the coverages have two properties: The first position of the result vector contains the a time series of the first property of first location. The second position of the result vector contains the a time series of the second property of the first location. The third position of the result vector contains the a time series of the first property of the second location. And so on.

Parameters
lA given polygon.
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 214 of file CoverageSeries.cpp.

References te::gm::Polygon::clone().

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Envelope e,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series inside the given envelope.

It returns a set of time series, one for each point inside the envelope and for each property of the coverage.

This method returns the time series of all properties of the coverages, ordered by locations.

An example, if the coverages have two properties: The first position of the result vector contains the a time series of the first property of first location. The second position of the result vector contains the a time series of the second property of the first location. The third position of the result vector contains the a time series of the first property of the second location. And so on.

Parameters
eA given envelope.
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 250 of file CoverageSeries.cpp.

References te::gm::GetGeomFromEnvelope().

std::auto_ptr< te::st::TimeSeries > te::st::CoverageSeries::getTimeSeries ( const te::gm::Point l,
const te::dt::DateTime t,
te::dt::TemporalRelation  tr = te::dt::DURING,
unsigned int  p = 0 
) const

It returns a time series of the p-th property associated to a given location and considering a given temporal restriction.

Parameters
lA given location.
tA given time
trA given temporal restriction
pA given property or band
Returns
A pointer to the time series of the p-th property associated to a given location
Note
The caller will take the ownership of the returned pointer.
The caller will NOT take the ownership of the given date and time pointer.

Definition at line 258 of file CoverageSeries.cpp.

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Point l,
const te::dt::DateTime t,
te::dt::TemporalRelation  tr,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series associated to a given location and considering a given temporal restriction.

It returns a set of time series, one for each property of the coverage.

Parameters
lA given location.
tA given time
trA given temporal restriction
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 265 of file CoverageSeries.cpp.

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Polygon l,
unsigned int  p,
const te::dt::DateTime t,
te::dt::TemporalRelation  tr,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series of the p-th property inside the given polygon and considering a given temporal restriction.

It returns a set of time series, one for each point inside the polygon

Parameters
lA given polygon.
pA given property.
tA given time
trA given temporal restriction
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 272 of file CoverageSeries.cpp.

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Envelope e,
unsigned int  p,
const te::dt::DateTime t,
te::dt::TemporalRelation  tr,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series of the p-th property inside the given envelope and considering a given temporal restriction.

It returns a set of time series, one for each point inside the envelope

Parameters
lA given envelope.
pA given property.
tA given time
trA given temporal restriction
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 280 of file CoverageSeries.cpp.

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Polygon l,
const te::dt::DateTime t,
te::dt::TemporalRelation  tr,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series inside the given polygon and considering a given temporal restriction.

It returns a set of time series, one for each point inside the polygon and for each property of the coverage

Parameters
lA given polygon.
tA given time
trA given temporal restriction
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 288 of file CoverageSeries.cpp.

void te::st::CoverageSeries::getTimeSeries ( const te::gm::Envelope e,
const te::dt::DateTime t,
te::dt::TemporalRelation  tr,
boost::ptr_vector< TimeSeries > &  r 
) const

It returns the time series inside the given envelope and considering a given temporal restriction.

It returns a set of time series, one for each point inside the envelope and for each property of the coverage

Parameters
eA given envelope.
tA given time
trA given temporal restriction
rThe resulting time series
Note
The caller will take the ownership of the returned pointer.

Definition at line 295 of file CoverageSeries.cpp.

te::st::CoverageType te::st::CoverageSeries::getType ( ) const

It returns the type of the internal coverages.

For while, there are two kinds of Coverages: Point Coverage and Raster Coverage.

Returns
Returns the coverage type.

Definition at line 62 of file CoverageSeries.cpp.

std::size_t te::st::CoverageSeries::size ( void  ) const

It returns the size of the coverage series observations.

Returns
The observations size of the coverage series.

Definition at line 93 of file CoverageSeries.cpp.

Member Data Documentation

CoverageType te::st::CoverageSeries::m_cvtype
protected

Definition at line 479 of file CoverageSeries.h.

AbstractCoverageSeriesInterp* te::st::CoverageSeries::m_interpolator
protected

The coverage series observations.

The interpolator used to estimate non-observed times.

Definition at line 478 of file CoverageSeries.h.

CoverageSeriesObservationSet te::st::CoverageSeries::m_observations
protected

Definition at line 477 of file CoverageSeries.h.

std::auto_ptr<te::gm::Geometry> te::st::CoverageSeries::m_sextent
protected

Definition at line 480 of file CoverageSeries.h.


The documentation for this class was generated from the following files: