27 #include "../../../geometry/Polygon.h" 28 #include "../../../geometry/Point.h" 29 #include "../../../geometry/Utils.h" 30 #include "../../../datatype/DateTime.h" 31 #include "../../../datatype/DateTimeInstant.h" 32 #include "../../../datatype/DateTimeUtils.h" 37 #include "../interpolator/AbstractCoverageSeriesInterp.h" 38 #include "../interpolator/NearestCoverageAtTimeInterp.h" 112 CoverageSeriesObservationSet::const_iterator itcs =
m_observations.find(aux);
120 CoverageSeriesObservationSet::const_iterator it =
m_observations.find(aux);
122 return std::unique_ptr<te::st::Coverage>(it->second->clone());
127 std::unique_ptr<te::st::TimeSeries>
131 result->setLocation(static_cast<te::gm::Geometry*>(l.
clone()));
133 CoverageSeriesObservationSet::const_iterator it =
m_observations.begin();
137 std::unique_ptr<te::dt::AbstractData> value(it->second->getValue(l,p));
138 result->add(dt, value.release());
146 CoverageSeriesObservationSet::const_iterator it =
m_observations.begin();
150 unsigned int numts = it->second->getNumberOfProperties();
151 for(
unsigned int i=0; i<numts; ++i)
154 ts->setLocation(static_cast<te::gm::Geometry*>(l.
clone()));
155 r.push_back(ts.release());
160 boost::ptr_vector<te::dt::AbstractData> values;
161 it->second->getValue(l,values);
162 for(
unsigned int i=0; i<numts; ++i)
163 r[i].
add(static_cast<te::dt::DateTime*>(it->first->clone()), &values[i]);
172 CoverageSeriesObservationSet::const_iterator it =
m_observations.begin();
178 boost::ptr_vector<te::dt::AbstractData> values;
179 it->second->getValue(l,p,values);
181 for(
unsigned int i=0; i<values.size(); ++i)
184 result->setLocation(static_cast<te::gm::Geometry*>(l.
clone()));
185 result->add(static_cast<te::dt::DateTime*>(it->first->clone()), &values[i]);
186 r.push_back(result.release());
195 it->second->getValue(l,p,values);
197 for(
unsigned int i=0; i<values.size(); ++i)
198 r[i].
add(static_cast<te::dt::DateTime*>(it->first->clone()), &values[i]);
207 boost::ptr_vector<TimeSeries>& r)
const 217 CoverageSeriesObservationSet::const_iterator it =
m_observations.begin();
223 boost::ptr_vector<te::dt::AbstractData> values;
224 it->second->getValue(l,values);
226 for(
unsigned int i=0; i<values.size(); ++i)
229 result->setLocation(static_cast<te::gm::Geometry*>(l.
clone()));
230 result->add(static_cast<te::dt::DateTime*>(it->first->clone()), &values[i]);
231 r.push_back(result.release());
240 it->second->getValue(l,values);
242 for(
unsigned int i=0; i<values.size(); ++i)
243 r[i].
add(static_cast<te::dt::DateTime*>(it->first->clone()), &values[i]);
262 std::unique_ptr<te::st::CoverageSeries> aux =
getPatch(t,tr);
263 return aux->getTimeSeries(l,p);
269 std::unique_ptr<te::st::CoverageSeries> aux =
getPatch(t,tr);
270 return aux->getTimeSeries(l,r);
276 std::unique_ptr<te::st::CoverageSeries> aux =
getPatch(t,tr);
277 return aux->getTimeSeries(l,p,r);
284 std::unique_ptr<te::st::CoverageSeries> aux =
getPatch(t,tr);
285 return aux->getTimeSeries(e,p,r);
292 std::unique_ptr<te::st::CoverageSeries> aux =
getPatch(t,tr);
293 return aux->getTimeSeries(l,r);
299 std::unique_ptr<te::st::CoverageSeries> aux =
getPatch(t,tr);
300 return aux->getTimeSeries(e,r);
303 std::unique_ptr<te::st::CoverageSeries>
306 std::unique_ptr<te::st::CoverageSeries> cs (
new CoverageSeries());
308 CoverageSeriesObservationSet::const_iterator itb =
m_observations.end();
309 CoverageSeriesObservationSet::const_iterator ite =
m_observations.end();
347 std::pair<CoverageSeriesObservationSet::const_iterator, CoverageSeriesObservationSet::const_iterator> itPair;
364 std::unique_ptr<te::st::CoverageSeries>
367 return std::unique_ptr<te::st::CoverageSeries>();
370 std::unique_ptr<te::st::CoverageSeries>
373 return std::unique_ptr<te::st::CoverageSeries>();
377 std::unique_ptr<te::st::CoverageSeries>
381 return std::unique_ptr<te::st::CoverageSeries>();
385 std::unique_ptr<te::st::CoverageSeries>
389 return std::unique_ptr<te::st::CoverageSeries>();
static boost::posix_time::ptime bt
An abstract class for interpolation function or interpolator that estimate coverages at non-observed ...
std::unique_ptr< te::dt::DateTimePeriod > getTemporalExtent() const
It returns the temporal extent of the coverage series.
This file contains a class to represent a CoverageSeries observation.
CoverageSeriesIterator end() const
It returns an iterator that points to the end of the time series.
CoverageSeriesIterator begin() const
It returns an iterator that points to the first observation of the point coverage.
std::map< te::dt::DateTimeShrPtr, CoverageShrPtr, CompareShrDateTime > CoverageSeriesObservationSet
boost::shared_ptr< te::st::Coverage > CoverageShrPtr
std::pair< te::dt::DateTimeShrPtr, CoverageShrPtr > CoverageSeriesObservation
CoverageType
An enum for the types of coverage.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
std::unique_ptr< te::gm::Geometry > m_sextent
SpatialRelation
Spatial relations between geometric objects.
AbstractCoverageSeriesInterp * m_interpolator
The coverage series observations.
virtual std::unique_ptr< Coverage > estimate(const CoverageSeries &cvs, te::dt::DateTime *time) const =0
It estimates a coverage of a coverage series at a given non-observed time .
boost::shared_ptr< DateTime > DateTimeShrPtr
virtual te::dt::AbstractData * clone() const
It clones the linestring.
A class to traverse the observations of a CoverageSeries.
A point with x and y coordinate values.
An Envelope defines a 2D rectangular region.
virtual te::dt::AbstractData * clone() const
It clones the point.
const CoverageSeriesObservationSet & getObservations() const
It returns the coverage series observations.
std::unique_ptr< te::st::Coverage > getCoverage(te::dt::DateTime *t) const
It returns the coverage associated to a given date and time.
static te::dt::TimeDuration dt(20, 30, 50, 11)
std::unique_ptr< te::st::TimeSeries > 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.
virtual AbstractData * clone() const =0
It returns a clone of this object.
CoverageSeriesIterator at(te::dt::DateTime *t) const
It returns an iterator that points to an observation at a given time.
CoverageSeries()
A constructor.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
This file contains a class to represent a coverage series.
CoverageSeriesObservationSet m_observations
std::size_t size() const
It returns the size of the coverage series observations.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
An abstract class to represent a period of date and time.
A class to represent time series.
CoverageType getType() const
It returns the type of the internal coverages.
te::gm::Geometry * getSpatialExtent() const
It returns the spatial extent of the coverage series.
An abstract class to represent a coverage.
virtual DateTimeInstant * getInitialInstant() const =0
It gets the initial date time instant.
It is an interpolation function the estimates the nearest coverage at a given non-observed time...
TEDATATYPEEXPORT DateTimePeriod * GetTemporalExtent(const DateTime *t1, const DateTime *t2)
It returns the temporal extent of two date and time types.
virtual ~CoverageSeries()
Virtual destructor.
std::unique_ptr< 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.
virtual DateTimeInstant * getFinalInstant() const =0
It gets the final date time instant.
void add(te::dt::DateTime *time, te::st::Coverage *cv)
It adds an observation (time and coverage) into the coverage series.
TEGEOMEXPORT Geometry * GetGeomFromEnvelope(const Envelope *const e, int srid)
It creates a Geometry (a polygon) from the given envelope.