27 #include "../../../datatype/DateTime.h" 28 #include "../../../datatype/AbstractData.h" 29 #include "../../../geometry/Geometry.h" 30 #include "../../../geometry/Point.h" 31 #include "../../../raster/Raster.h" 34 #include <boost/shared_ptr.hpp> 35 #include <boost/ptr_container/ptr_vector.hpp> 39 #include "../interpolator/AbstractPointCoverageInterp.h" 40 #include "../interpolator/IDWInterpolator.h" 58 const std::vector<int>& ,
59 const std::vector<std::string>& )
76 const std::vector<int>& ,
77 const std::vector<std::string>& ,
104 boost::ptr_vector<te::dt::AbstractData> aux;
105 aux.push_back(value);
132 static_cast<te::gm::Geometry*>(
m_sextent->clone()),
136 PointCoverageObservationSet::const_iterator it =
m_observations.begin();
140 std::unique_ptr< boost::ptr_vector<te::dt::AbstractData> > data(item->second.clone());
141 result->
add(item->first, *data.release());
179 for(
unsigned int i = 0; i<
m_np; ++i)
190 boost::ptr_vector<te::dt::AbstractData>& )
const 198 boost::ptr_vector<te::dt::AbstractData>& )
const 207 for(
unsigned int i = 0; i<
m_np; ++i)
209 std::unique_ptr<te::dt::AbstractData> aux =
getValue(l,i);
210 result.push_back(atoi(aux->toString().c_str()));
216 std::unique_ptr<te::dt::AbstractData> result =
getValue(l,p);
217 return atoi(result->toString().c_str());
236 for(
unsigned int i = 0; i<
m_np; ++i)
238 std::unique_ptr<te::dt::AbstractData> aux =
getValue(l,i);
239 result.push_back(atof(aux->toString().c_str()));
245 std::unique_ptr<te::dt::AbstractData> result =
getValue(l,p);
246 return atof(result->toString().c_str());
266 return std::unique_ptr<te::rst::Raster>();
272 return std::unique_ptr<te::rst::Raster>();
std::unique_ptr< te::dt::DateTime > m_textent
A concrete class to represent a point coverage.
PointCoverageIterator end() const
It returns an iterator that points to the end of the time series.
PointCoverage()
A constructor.
A class that represents an R-tree.
unsigned int getNumberOfProperties() const
It returns the number of properties associated to the coverage.
virtual std::unique_ptr< te::dt::AbstractData > estimate(const PointCoverage &cv, unsigned int p, const te::gm::Point &l)=0
It estimates a value at a given non-observed location, in a PointCoverage.
CoverageType
An enum for the types of coverage.
An abstract class for interpolation function or interpolator that estimate values at non-observaved l...
Coverage * clone() const
It returns a clone of this coverage.
const std::vector< int > & getPropertyTypes() const
It returns the types of the coverage properties.
virtual ~PointCoverage()
Virtual destructor.
std::pair< te::gm::Point, boost::ptr_vector< te::dt::AbstractData > > PointCoverageItem
PointCvRTreeShrPtr m_rTree
A class to traverse the observations of a PointCoverage.
boost::shared_ptr< PointCoverageItem > PointCoverageObservation
std::unique_ptr< te::rst::Raster > getRaster() const
It returns a raster associated to the coverage.
AbstractPointCoverageInterp * m_interpolator
PointCoverageObservationSet m_observations
void add(const te::gm::Point &l, te::dt::AbstractData *value)
It adds an observtion to the PointCoverage.
A point with x and y coordinate values.
An Envelope defines a 2D rectangular region.
A base class for values that can be retrieved from the data access module.
void getInt(const te::gm::Point &l, std::vector< int > &result) const
It returns the values as integers associated to a given location.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
const std::vector< std::string > & getPropertyNames() const
It returns the names of the coverage properties.
A class that implements an inverse distance weighted (IDW) interpolationan function for PointCoverage...
CoverageType getType() const
It returns the coverage type.
void getValue(const te::gm::Point &l, boost::ptr_vector< te::dt::AbstractData > &result) const
It returns the values associated to a given location.
PointCoverageIterator begin() const
It returns an iterator that points to the first observation of the point coverage.
std::unique_ptr< te::gm::Geometry > m_sextent
This file contains a concrete class to represent a point coverage.
std::vector< std::string > m_pnames
The types of the point coverage properties.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
int m_tp
The names of the point coverage properties.
An abstract class to represent a coverage.
std::vector< int > m_ptypes
The number of properties of the point coverage.
te::dt::DateTime * getTime() const
It returns the time associated to the coverage.
void getDouble(const te::gm::Point &l, std::vector< double > &result) const
It returns the values as doubles associated to a given location.
te::gm::Geometry * getSpatialExtent() const
It returns the spatial extent of a coverage.