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::unique_ptr< te::st::CoveragegetCoverage (te::dt::DateTime *t) const
 It returns the coverage associated to a given date and time. More...
 
const CoverageSeriesObservationSetgetObservations () const
 It returns the coverage series observations. More...
 
te::gm::GeometrygetSpatialExtent () const
 It returns the spatial extent of the coverage series. More...
 
std::unique_ptr< te::dt::DateTimePeriodgetTemporalExtent () 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::unique_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::unique_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::unique_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::unique_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::unique_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::unique_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::unique_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::unique_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

◆ CoverageSeries() [1/2]

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

A constructor.

Note
Internally, it will use the interpolator NearestCoverageAtTimeInterp

◆ CoverageSeries() [2/2]

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.

◆ ~CoverageSeries()

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

Virtual destructor.

Member Function Documentation

◆ add() [1/2]

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.

◆ add() [2/2]

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

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

Parameters
oAn observation

◆ at()

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.

◆ begin()

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.

◆ end()

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

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

Returns
The coverage series iterator.

◆ getCoverage()

std::unique_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.

◆ getObservations()

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

It returns the coverage series observations.

Returns
A reference to the coverage series observations.

◆ getPatch() [1/5]

std::unique_ptr<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.

◆ getPatch() [2/5]

std::unique_ptr<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.

◆ getPatch() [3/5]

std::unique_ptr<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.

◆ getPatch() [4/5]

std::unique_ptr<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.

◆ getPatch() [5/5]

std::unique_ptr<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.

◆ getSpatialExtent()

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.

◆ getTemporalExtent()

std::unique_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.

◆ getTimeSeries() [1/12]

std::unique_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.

◆ getTimeSeries() [2/12]

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.

◆ getTimeSeries() [3/12]

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.

◆ getTimeSeries() [4/12]

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.

◆ getTimeSeries() [5/12]

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.

◆ getTimeSeries() [6/12]

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.

◆ getTimeSeries() [7/12]

std::unique_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.

◆ getTimeSeries() [8/12]

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.

◆ getTimeSeries() [9/12]

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.

◆ getTimeSeries() [10/12]

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.

◆ getTimeSeries() [11/12]

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.

◆ getTimeSeries() [12/12]

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.

◆ getType()

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.

◆ size()

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

It returns the size of the coverage series observations.

Returns
The observations size of the coverage series.

Member Data Documentation

◆ m_cvtype

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

Definition at line 479 of file CoverageSeries.h.

◆ m_interpolator

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.

◆ m_observations

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

Definition at line 477 of file CoverageSeries.h.

◆ m_sextent

std::unique_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 file: