te::st::Observation Class Reference

A class to represent an observation. More...

#include <Observation.h>

Public Member Functions

void addValue (te::dt::AbstractData *value)
 It adds an observed value. More...
 
Observationclone () const
 It returns a clone of this object. More...
 
te::gm::GeometrygetGeometry () const
 It returns the observation location or region. More...
 
const te::dt::AbstractDatagetObservedValue (int idx=0) const
 It returns the idx-th observed value. More...
 
boost::ptr_vector< te::dt::AbstractData > & getObservedValues ()
 It returns the observed values. More...
 
te::dt::DateTimeInstantgetResultTime () const
 It returns the result time. More...
 
te::dt::DateTimegetTime () const
 It returns the phenomenon time. More...
 
te::dt::DateTimePeriodgetValidTime () const
 It returns the valid time. More...
 
 Observation ()
 It constructs an empty Observation. More...
 
 Observation (te::dt::DateTime *phTime)
 Constructor. More...
 
 Observation (te::dt::DateTime *phTime, te::dt::AbstractData *obsValue)
 Constructor. More...
 
 Observation (te::dt::DateTime *phTime, te::gm::Geometry *geom, const boost::ptr_vector< te::dt::AbstractData > &obsValues)
 Constructor. More...
 
 Observation (te::dt::DateTime *phTime, te::dt::DateTimeInstant *resTime, te::dt::DateTimePeriod *valTime, te::gm::Geometry *geom, const boost::ptr_vector< te::dt::AbstractData > &obsValues)
 Constructor. More...
 
 Observation (const Observation &obs)
 Copy constructor. More...
 
const Observationoperator= (const Observation &rhs)
 Assignment operator. More...
 
void setGeometry (te::gm::Geometry *geom)
 It sets the observation location or region. More...
 
void setResultTime (te::dt::DateTimeInstant *resTime)
 It sets the result time. More...
 
void setTime (te::dt::DateTime *phTime)
 It sets the phenomenon time. More...
 
void setValidTime (te::dt::DateTimePeriod *valTime)
 It sets the valid time. More...
 
void setValues (const boost::ptr_vector< te::dt::AbstractData > &values)
 It sets the observed values. More...
 
virtual ~Observation ()
 Virtual destructor. More...
 

Private Attributes

std::unique_ptr< te::gm::Geometrym_geometry
 The observation location. More...
 
boost::ptr_vector< te::dt::AbstractDatam_observedValues
 The observed values. More...
 
std::unique_ptr< te::dt::DateTimem_phTime
 The phenomenon time. More...
 
std::unique_ptr< te::dt::DateTimeInstantm_resultTime
 The result time. More...
 
std::unique_ptr< te::dt::DateTimePeriodm_validTime
 The valid time. More...
 

Detailed Description

A class to represent an observation.

An observation is a result of a measurement associated to a discrete time instant or period which assigns values to a phenomenon. It follows the OGC's Observation and Measurement (O&M) specification. An observation is composed of: (1) a phenomenon time, (2) a valid time, (3) a result time, (4) observed values.

See also
ObservationDataSet AbstractData DateTime

Definition at line 60 of file Observation.h.

Constructor & Destructor Documentation

te::st::Observation::Observation ( )

It constructs an empty Observation.

Definition at line 36 of file Observation.cpp.

Referenced by clone().

te::st::Observation::Observation ( te::dt::DateTime phTime)

Constructor.

Parameters
phTimeA pointer to phenomenon time.
Note
It will take the ownership of the DateTime input pointer.

Definition at line 41 of file Observation.cpp.

te::st::Observation::Observation ( te::dt::DateTime phTime,
te::dt::AbstractData obsValue 
)

Constructor.

Parameters
phTimeA pointer to phenomenon time.
obsValueA observed value.
Note
It will take the ownership of the DateTime and AbstractData input pointers.

Definition at line 46 of file Observation.cpp.

References m_observedValues.

te::st::Observation::Observation ( te::dt::DateTime phTime,
te::gm::Geometry geom,
const boost::ptr_vector< te::dt::AbstractData > &  obsValues 
)

Constructor.

Parameters
phTimeA pointer to phenomenon time.
geomThe observation location.
obsValuesThe observed values.
Note
It will take the ownership of the input pointers.

Definition at line 54 of file Observation.cpp.

te::st::Observation::Observation ( te::dt::DateTime phTime,
te::dt::DateTimeInstant resTime,
te::dt::DateTimePeriod valTime,
te::gm::Geometry geom,
const boost::ptr_vector< te::dt::AbstractData > &  obsValues 
)

Constructor.

Parameters
phTimeA pointer to phenomenon time.
resTimeA pointer to the result time.
valTimeA pointer to the valid time.
geomThe observation location.
obsValuesThe observed values.
Note
It will take the ownership of the input pointers.

Definition at line 64 of file Observation.cpp.

te::st::Observation::Observation ( const Observation obs)

Copy constructor.

Definition at line 75 of file Observation.cpp.

te::st::Observation::~Observation ( )
virtualdefault

Virtual destructor.

Referenced by clone().

Member Function Documentation

void te::st::Observation::addValue ( te::dt::AbstractData value)

It adds an observed value.

Parameters
Apointer to the observed value to be added.
Note
It will take the ownership of the input pointer.

Definition at line 144 of file Observation.cpp.

References m_observedValues.

te::st::Observation * te::st::Observation::clone ( ) const

It returns a clone of this object.

Returns
A clone of this object.
Note
The caller will take the ownership of the input pointer.

Definition at line 165 of file Observation.cpp.

References Observation(), and ~Observation().

te::gm::Geometry * te::st::Observation::getGeometry ( ) const

It returns the observation location or region.

Returns
A pointer to the geometry.
Note
The caller will NOT take the ownership of the returned pointer.

Definition at line 155 of file Observation.cpp.

References m_geometry.

const te::dt::AbstractData * te::st::Observation::getObservedValue ( int  idx = 0) const

It returns the idx-th observed value.

Returns
A pointer to the idx-th observed value.
Note
The caller will NOT take the ownership of the returned pointer.

Definition at line 139 of file Observation.cpp.

References m_observedValues.

boost::ptr_vector< te::dt::AbstractData > & te::st::Observation::getObservedValues ( )

It returns the observed values.

Returns
A reference to the observed values.
Note
The caller will NOT take the ownership of the returned pointer.

Definition at line 134 of file Observation.cpp.

References m_observedValues.

te::dt::DateTimeInstant * te::st::Observation::getResultTime ( ) const

It returns the result time.

Returns
A pointer to the result time.
Note
The caller will NOT take the ownership of the returned pointer.

Definition at line 114 of file Observation.cpp.

References m_resultTime.

te::dt::DateTime * te::st::Observation::getTime ( ) const

It returns the phenomenon time.

Returns
A pointer to the phenomenon time.
Note
The caller will NOT take the ownership of the returned pointer.

Definition at line 104 of file Observation.cpp.

References m_phTime.

te::dt::DateTimePeriod * te::st::Observation::getValidTime ( ) const

It returns the valid time.

Returns
A pointer to the valid time.
Note
The caller will NOT take the ownership of the returned pointer.

Definition at line 124 of file Observation.cpp.

References m_validTime.

const te::st::Observation & te::st::Observation::operator= ( const Observation rhs)

Assignment operator.

Definition at line 80 of file Observation.cpp.

References m_geometry, m_observedValues, m_phTime, m_resultTime, and m_validTime.

void te::st::Observation::setGeometry ( te::gm::Geometry geom)

It sets the observation location or region.

Parameters
geomA pointer to the observation location or region.
Note
It will take the ownership of the input pointer.

Definition at line 160 of file Observation.cpp.

References m_geometry.

void te::st::Observation::setResultTime ( te::dt::DateTimeInstant resTime)

It sets the result time.

Parameters
Apointer to the result time.
Note
It will take the ownership of the input pointer.

Definition at line 119 of file Observation.cpp.

References m_resultTime.

void te::st::Observation::setTime ( te::dt::DateTime phTime)

It sets the phenomenon time.

Parameters
Apointer to the the phenomenon time.
Note
It will take the ownership of the input pointer.

Definition at line 109 of file Observation.cpp.

References m_phTime.

void te::st::Observation::setValidTime ( te::dt::DateTimePeriod valTime)

It sets the valid time.

Parameters
Apointer to the valid time.
Note
It will take the ownership of the input pointer.

Definition at line 129 of file Observation.cpp.

References m_validTime.

void te::st::Observation::setValues ( const boost::ptr_vector< te::dt::AbstractData > &  values)

It sets the observed values.

Parameters
Areference to the observed values.
Note
It will take the ownership of the input pointer.

Definition at line 149 of file Observation.cpp.

References m_observedValues.

Member Data Documentation

std::unique_ptr<te::gm::Geometry> te::st::Observation::m_geometry
private

The observation location.

Definition at line 248 of file Observation.h.

Referenced by getGeometry(), operator=(), and setGeometry().

boost::ptr_vector<te::dt::AbstractData> te::st::Observation::m_observedValues
private

The observed values.

Definition at line 247 of file Observation.h.

Referenced by addValue(), getObservedValue(), getObservedValues(), Observation(), operator=(), and setValues().

std::unique_ptr<te::dt::DateTime> te::st::Observation::m_phTime
private

The phenomenon time.

Definition at line 244 of file Observation.h.

Referenced by getTime(), operator=(), and setTime().

std::unique_ptr<te::dt::DateTimeInstant> te::st::Observation::m_resultTime
private

The result time.

Definition at line 245 of file Observation.h.

Referenced by getResultTime(), operator=(), and setResultTime().

std::unique_ptr<te::dt::DateTimePeriod> te::st::Observation::m_validTime
private

The valid time.

Definition at line 246 of file Observation.h.

Referenced by getValidTime(), operator=(), and setValidTime().


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