A concrete class to represent a point coverage. More...
#include <PointCoverage.h>
Public Member Functions | |
void | add (const te::gm::Point &l, te::dt::AbstractData *value) |
It adds an observtion to the PointCoverage. More... | |
void | add (const te::gm::Point &l, boost::ptr_vector< te::dt::AbstractData > &value) |
It adds an observtion to the PointCoverage. More... | |
void | add (PointCoverageObservation &obs) |
It adds an observtion to the PointCoverage. More... | |
PointCoverage () | |
A constructor. More... | |
PointCoverage (AbstractPointCoverageInterp *interp, te::gm::Geometry *sextent, te::dt::DateTime *textent, int np, const std::vector< int > &ptypes, const std::vector< std::string > &pnames) | |
A constructor. More... | |
PointCoverage (AbstractPointCoverageInterp *interp, te::gm::Geometry *sextent, te::dt::DateTime *textent, int np, const std::vector< int > &ptypes, const std::vector< std::string > &pnames, int tp) | |
A constructor. More... | |
virtual | ~PointCoverage () |
Virtual destructor. More... | |
PointCoverage Iterator | |
An example of use: PointCoverageIterator it = cv.begin(); while(it!=cv.end()) { Point& l = it.getLocation(); double v = it.getDouble(i); //or getValue() or getInt()... ++it; } | |
PointCoverageIterator | begin () const |
It returns an iterator that points to the first observation of the point coverage. More... | |
PointCoverageIterator | end () const |
It returns an iterator that points to the end of the time series. More... | |
Coverage inherited methods | |
Coverage * | clone () const |
It returns a clone of this coverage. More... | |
CoverageType | getType () const |
It returns the coverage type. More... | |
te::gm::Geometry * | getSpatialExtent () const |
It returns the spatial extent of a coverage. More... | |
te::dt::DateTime * | getTime () const |
It returns the time associated to the coverage. More... | |
unsigned int | getNumberOfProperties () const |
It returns the number of properties associated to the coverage. More... | |
const std::vector< int > & | getPropertyTypes () const |
It returns the types of the coverage properties. More... | |
const std::vector< std::string > & | getPropertyNames () const |
It returns the names of the coverage properties. More... | |
void | getValue (const te::gm::Point &l, boost::ptr_vector< te::dt::AbstractData > &result) const |
It returns the values associated to a given location. More... | |
std::auto_ptr< te::dt::AbstractData > | getValue (const te::gm::Point &l, unsigned int p=0) const |
It returns the value of the p-th property associated to a given location. More... | |
void | getValue (const te::gm::Polygon &l, unsigned int p, boost::ptr_vector< te::dt::AbstractData > &result) const |
It returns the values of the p-th property associated to the locations inside a given polygon. More... | |
void | getValue (const te::gm::Polygon &l, boost::ptr_vector< te::dt::AbstractData > &result) const |
It returns values associated to the locations inside a given polygon. More... | |
void | getInt (const te::gm::Point &l, std::vector< int > &result) const |
It returns the values as integers associated to a given location. More... | |
int | getInt (const te::gm::Point &l, unsigned int p=0) const |
It returns the value as integer of the p-th property associated to a given location. More... | |
void | getInt (const te::gm::Polygon &l, unsigned int p, std::vector< int > &result) const |
It returns the values as integers of the p-th property associated to the locations inside a given polygon. More... | |
void | getInt (const te::gm::Polygon &l, std::vector< int > &result) const |
It returns values as integers associated to the locations inside a given polygon. More... | |
void | getDouble (const te::gm::Point &l, std::vector< double > &result) const |
It returns the values as doubles associated to a given location. More... | |
double | getDouble (const te::gm::Point &l, unsigned int p=0) const |
It returns the value as double of the p-th property associated to a given location. More... | |
void | getDouble (const te::gm::Polygon &l, unsigned int p, std::vector< double > &result) const |
It returns the values as doubles of the p-th property associated to the locations inside a given polygon. More... | |
void | getDouble (const te::gm::Polygon &l, std::vector< double > &result) const |
It returns values as doubles associated to the locations inside a given polygon. More... | |
std::auto_ptr< te::rst::Raster > | getRaster () const |
It returns a raster associated to the coverage. More... | |
std::auto_ptr< te::rst::Raster > | getRaster (unsigned int p) const |
It returns a raster associated to the coverage of the i-th property. More... | |
Protected Attributes | |
AbstractPointCoverageInterp * | m_interpolator |
unsigned int | m_np |
PointCoverageObservationSet | m_observations |
std::vector< std::string > | m_pnames |
The types of the point coverage properties. More... | |
std::vector< int > | m_ptypes |
The number of properties of the point coverage. More... | |
PointCvRTreeShrPtr | m_rTree |
std::auto_ptr< te::gm::Geometry > | m_sextent |
std::auto_ptr< te::dt::DateTime > | m_textent |
int | m_tp |
The names of the point coverage properties. More... | |
A concrete class to represent a point coverage.
A point coverage is a coverage composed of a set of observations where each one contains a location (point) and a set properties associated to it.
Definition at line 70 of file PointCoverage.h.
te::st::PointCoverage::PointCoverage | ( | ) |
A constructor.
It constructs an empty point coverage. The user does not indicate the interpolator associated to it. Internally, it uses a default interpolator that is IDWInterpolator.
te::st::PointCoverage::PointCoverage | ( | AbstractPointCoverageInterp * | interp, |
te::gm::Geometry * | sextent, | ||
te::dt::DateTime * | textent, | ||
int | np, | ||
const std::vector< int > & | ptypes, | ||
const std::vector< std::string > & | pnames | ||
) |
A constructor.
It constructs an empty point coverage.
interp | The interpolator associated to the PointCoverage |
sextent | The spatial extent |
textent | The time associated to the coverage. |
np | The number of properties of the point coverage. |
ptypes | The types of the properties |
pnames | The names of the properties |
te::st::PointCoverage::PointCoverage | ( | AbstractPointCoverageInterp * | interp, |
te::gm::Geometry * | sextent, | ||
te::dt::DateTime * | textent, | ||
int | np, | ||
const std::vector< int > & | ptypes, | ||
const std::vector< std::string > & | pnames, | ||
int | tp | ||
) |
A constructor.
It constructs an empty point coverage.
interp | The interpolator associated to the PointCoverage |
sextent | The spatial extent |
textent | The time associated to the coverage. |
np | The number of properties of the point coverage. |
ptypes | The types of the properties |
pnames | The names of the properties |
tp | The index of the property that contains time associated to each observation |
|
virtual |
Virtual destructor.
void te::st::PointCoverage::add | ( | const te::gm::Point & | l, |
te::dt::AbstractData * | value | ||
) |
It adds an observtion to the PointCoverage.
l | The given location. |
value | The value associated to the given location. |
void te::st::PointCoverage::add | ( | const te::gm::Point & | l, |
boost::ptr_vector< te::dt::AbstractData > & | value | ||
) |
It adds an observtion to the PointCoverage.
l | The given location. |
value | A vector of values associated to the given location. |
void te::st::PointCoverage::add | ( | PointCoverageObservation & | obs | ) |
It adds an observtion to the PointCoverage.
obs | The observation. |
PointCoverageIterator te::st::PointCoverage::begin | ( | ) | const |
It returns an iterator that points to the first observation of the point coverage.
|
virtual |
It returns a clone of this coverage.
Implements te::st::Coverage.
PointCoverageIterator te::st::PointCoverage::end | ( | ) | const |
It returns an iterator that points to the end of the time series.
|
virtual |
It returns the values as doubles associated to a given location.
This method returns the values of all properties of the coverage.
l | The given location |
result | The returned values associated to a given location |
Implements te::st::Coverage.
|
virtual |
It returns the value as double of the p-th property associated to a given location.
l | The given location |
p | The index of the property that will be considered. |
Implements te::st::Coverage.
|
virtual |
It returns the values as doubles of the p-th property associated to the locations inside a given polygon.
l | The given polygon |
p | The desired property |
result | The returned values of the p-th property associated to the locations inside a given polygon |
Implements te::st::Coverage.
|
virtual |
It returns values as doubles associated to the locations inside a given polygon.
This method returns the values of all properties of the coverage, ordered by locations.
An example, if the coverage has two properties: The first position of the result vector contains the first property value of first location. The second position of the result vector contains the second property value of the first location. The third position of the result vector contains the first property value of the second location. And so on.
l | The given polygon |
result | The returned values associated the locations inside a given polygon |
Implements te::st::Coverage.
|
virtual |
It returns the values as integers associated to a given location.
This method returns the values of all properties of the coverage.
l | The given location |
result | The returned values associated to a given location |
Implements te::st::Coverage.
|
virtual |
It returns the value as integer of the p-th property associated to a given location.
l | The given location |
p | The index of the property that will be considered. |
Implements te::st::Coverage.
|
virtual |
It returns the values as integers of the p-th property associated to the locations inside a given polygon.
l | The given polygon |
p | The desired property |
result | The returned values of the p-th property associated to the locations inside a given polygon |
Implements te::st::Coverage.
|
virtual |
It returns values as integers associated to the locations inside a given polygon.
This method returns the values of all properties of the coverage, ordered by locations.
An example, if the coverage has two properties: The first position of the result vector contains the first property value of first location. The second position of the result vector contains the second property value of the first location. The third position of the result vector contains the first property value of the second location. And so on.
l | The given polygon |
result | The returned values associated the locations inside a given polygon. |
Implements te::st::Coverage.
|
virtual |
It returns the number of properties associated to the coverage.
For raster coverage, the number of properties is equal to the number of bands. For point coverage, this means the number of properties associated to each point.
Implements te::st::Coverage.
|
virtual |
It returns the names of the coverage properties.
Implements te::st::Coverage.
|
virtual |
It returns the types of the coverage properties.
Implements te::st::Coverage.
|
virtual |
It returns a raster associated to the coverage.
For point coverage, it considers the interpolation function to generate the raster.
The returned raster will contain all properties, each property will be a band. If the caller wants to consider only one property, it must use the other getRaster method when the caller pass a defined property.
Implements te::st::Coverage.
|
virtual |
It returns a raster associated to the coverage of the i-th property.
For point coverage, it considers the interpolation function to generate a raster.
The returned raster will have one band associated to the given property.
p | The property that will be considered to generate the raster. |
Implements te::st::Coverage.
|
virtual |
It returns the spatial extent of a coverage.
Implements te::st::Coverage.
|
virtual |
It returns the time associated to the coverage.
Implements te::st::Coverage.
|
virtual |
It returns the coverage type.
For while, there are two kinds of Coverages: Point Coverage and Raster Coverage.
Implements te::st::Coverage.
|
virtual |
It returns the values associated to a given location.
This method returns the values of all properties of the coverage.
l | The given location |
result | The returned values associated to a given location |
Implements te::st::Coverage.
|
virtual |
It returns the value of the p-th property associated to a given location.
l | The given location |
p | The index of the property that will be considered. |
Implements te::st::Coverage.
|
virtual |
It returns the values of the p-th property associated to the locations inside a given polygon.
l | The given polygon |
p | The desired property |
result | The returned values of the p-th property associated to the locations inside a given polygon |
Implements te::st::Coverage.
|
virtual |
It returns values associated to the locations inside a given polygon.
This method returns the values of all properties of the coverage, ordered by locations.
An example, if the coverage has two properties: The first position of the result vector contains the first property value of first location. The second position of the result vector contains the second property value of the first location. The third position of the result vector contains the first property value of the second location. And so on.
l | The given polygon |
result | The returned values associated the locations inside a given polygon |
Implements te::st::Coverage.
|
protected |
Definition at line 232 of file PointCoverage.h.
|
protected |
Definition at line 234 of file PointCoverage.h.
|
protected |
Definition at line 231 of file PointCoverage.h.
|
protected |
The types of the point coverage properties.
Definition at line 236 of file PointCoverage.h.
|
protected |
The number of properties of the point coverage.
Definition at line 235 of file PointCoverage.h.
|
protected |
Definition at line 233 of file PointCoverage.h.
|
protected |
Definition at line 229 of file PointCoverage.h.
|
protected |
Definition at line 230 of file PointCoverage.h.
|
protected |
The names of the point coverage properties.
Definition at line 237 of file PointCoverage.h.