te::st::Coverage Class Referenceabstract

An abstract class to represent a coverage. More...

#include <Coverage.h>

Inheritance diagram for te::st::Coverage:
te::st::PointCoverage te::st::RasterCoverage

Public Member Functions

virtual Coverageclone () const =0
 It returns a clone of this coverage. More...
 
 Coverage ()
 A constructor. More...
 
virtual void getDouble (const te::gm::Point &l, std::vector< double > &result) const =0
 It returns the values as doubles associated to a given location. More...
 
virtual double getDouble (const te::gm::Point &l, unsigned int p=0) const =0
 It returns the value as double of the p-th property associated to a given location. More...
 
virtual void getDouble (const te::gm::Polygon &l, unsigned int p, std::vector< double > &result) const =0
 It returns the values as doubles of the p-th property associated to the locations inside a given polygon. More...
 
virtual void getDouble (const te::gm::Polygon &l, std::vector< double > &result) const =0
 It returns values as doubles associated to the locations inside a given polygon. More...
 
virtual void getInt (const te::gm::Point &l, std::vector< int > &result) const =0
 It returns the values as integers associated to a given location. More...
 
virtual int getInt (const te::gm::Point &l, unsigned int p=0) const =0
 It returns the value as integer of the p-th property associated to a given location. More...
 
virtual void getInt (const te::gm::Polygon &l, unsigned int p, std::vector< int > &result) const =0
 It returns the values as integers of the p-th property associated to the locations inside a given polygon. More...
 
virtual void getInt (const te::gm::Polygon &l, std::vector< int > &result) const =0
 It returns values as integers associated to the locations inside a given polygon. More...
 
virtual unsigned int getNumberOfProperties () const =0
 It returns the number of properties associated to the coverage. More...
 
virtual const std::vector< std::string > & getPropertyNames () const =0
 It returns the names of the coverage properties. More...
 
virtual const std::vector< int > & getPropertyTypes () const =0
 It returns the types of the coverage properties. More...
 
virtual std::unique_ptr< te::rst::RastergetRaster () const =0
 It returns a raster associated to the coverage. More...
 
virtual std::unique_ptr< te::rst::RastergetRaster (unsigned int p) const =0
 It returns a raster associated to the coverage of the i-th property. More...
 
virtual te::gm::GeometrygetSpatialExtent () const =0
 It returns the spatial extent of a coverage. More...
 
virtual te::dt::DateTimegetTime () const =0
 It returns the time associated to the coverage. More...
 
virtual CoverageType getType () const =0
 It returns the coverage type. More...
 
virtual void getValue (const te::gm::Point &l, boost::ptr_vector< te::dt::AbstractData > &result) const =0
 It returns the values associated to a given location. More...
 
virtual std::unique_ptr< te::dt::AbstractDatagetValue (const te::gm::Point &l, unsigned int p=0) const =0
 It returns the value of the p-th property associated to a given location. More...
 
virtual void getValue (const te::gm::Polygon &l, unsigned int p, boost::ptr_vector< te::dt::AbstractData > &result) const =0
 It returns the values of the p-th property associated to the locations inside a given polygon. More...
 
virtual void getValue (const te::gm::Polygon &l, boost::ptr_vector< te::dt::AbstractData > &result) const =0
 It returns values associated to the locations inside a given polygon. More...
 
virtual ~Coverage ()
 Virtual destructor. More...
 

Detailed Description

An abstract class to represent a coverage.

A coverage represents the variation of the values of a property
within a spatial extent at a specific time.

Definition at line 63 of file Coverage.h.

Constructor & Destructor Documentation

◆ Coverage()

te::st::Coverage::Coverage ( )

A constructor.

◆ ~Coverage()

virtual te::st::Coverage::~Coverage ( )
virtual

Virtual destructor.

Member Function Documentation

◆ clone()

virtual Coverage* te::st::Coverage::clone ( ) const
pure virtual

It returns a clone of this coverage.

Returns
A new coverage.
Note
The caller will take the ownership of the returned pointer.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getDouble() [1/4]

virtual void te::st::Coverage::getDouble ( const te::gm::Point l,
std::vector< double > &  result 
) const
pure virtual

It returns the values as doubles associated to a given location.

This method returns the values of all properties of the coverage.

Parameters
lThe given location
resultThe returned values associated to a given location

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getDouble() [2/4]

virtual double te::st::Coverage::getDouble ( const te::gm::Point l,
unsigned int  p = 0 
) const
pure virtual

It returns the value as double of the p-th property associated to a given location.

Parameters
lThe given location
pThe index of the property that will be considered.
Returns
Returns the value as a double associated to a given location

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getDouble() [3/4]

virtual void te::st::Coverage::getDouble ( const te::gm::Polygon l,
unsigned int  p,
std::vector< double > &  result 
) const
pure virtual

It returns the values as doubles of the p-th property associated to the locations inside a given polygon.

Parameters
lThe given polygon
pThe desired property
resultThe returned values of the p-th property associated to the locations inside a given polygon

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getDouble() [4/4]

virtual void te::st::Coverage::getDouble ( const te::gm::Polygon l,
std::vector< double > &  result 
) const
pure 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.

Parameters
lThe given polygon
resultThe returned values associated the locations inside a given polygon

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getInt() [1/4]

virtual void te::st::Coverage::getInt ( const te::gm::Point l,
std::vector< int > &  result 
) const
pure virtual

It returns the values as integers associated to a given location.

This method returns the values of all properties of the coverage.

Parameters
lThe given location
resultThe returned values associated to a given location

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getInt() [2/4]

virtual int te::st::Coverage::getInt ( const te::gm::Point l,
unsigned int  p = 0 
) const
pure virtual

It returns the value as integer of the p-th property associated to a given location.

Parameters
lThe given location
pThe index of the property that will be considered.
Returns
Returns the value as an integer associated to a given location

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getInt() [3/4]

virtual void te::st::Coverage::getInt ( const te::gm::Polygon l,
unsigned int  p,
std::vector< int > &  result 
) const
pure virtual

It returns the values as integers of the p-th property associated to the locations inside a given polygon.

Parameters
lThe given polygon
pThe desired property
resultThe returned values of the p-th property associated to the locations inside a given polygon

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getInt() [4/4]

virtual void te::st::Coverage::getInt ( const te::gm::Polygon l,
std::vector< int > &  result 
) const
pure 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.

Parameters
lThe given polygon
resultThe returned values associated the locations inside a given polygon.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getNumberOfProperties()

virtual unsigned int te::st::Coverage::getNumberOfProperties ( ) const
pure 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.

Returns
The number of properties associated to the coverage.
Note
The caller will NOT take the ownership of the returned date and time.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getPropertyNames()

virtual const std::vector<std::string>& te::st::Coverage::getPropertyNames ( ) const
pure virtual

It returns the names of the coverage properties.

Returns
The names of the coverage properties.
Note
The caller will take a refence to the internal vector.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getPropertyTypes()

virtual const std::vector<int>& te::st::Coverage::getPropertyTypes ( ) const
pure virtual

It returns the types of the coverage properties.

Returns
The types of the coverage properties.
Note
The caller will take a refence to the internal vector.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getRaster() [1/2]

virtual std::unique_ptr<te::rst::Raster> te::st::Coverage::getRaster ( ) const
pure 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.

Returns
Returns a raster associated to the coverage.
Note
The caller will take the ownership of the returned raster.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getRaster() [2/2]

virtual std::unique_ptr<te::rst::Raster> te::st::Coverage::getRaster ( unsigned int  p) const
pure 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.

Parameters
pThe property that will be considered to generate the raster.
Returns
Returns a raster associated to the coverage.
Note
The caller will take the ownership of the returned raster.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getSpatialExtent()

virtual te::gm::Geometry* te::st::Coverage::getSpatialExtent ( ) const
pure virtual

It returns the spatial extent of a coverage.

Returns
Returns the coverage spatial extent.
Note
The caller will NOT take the ownership of the returned geometry.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getTime()

virtual te::dt::DateTime* te::st::Coverage::getTime ( ) const
pure virtual

It returns the time associated to the coverage.

Returns
Returns the time associated to the coverage.
Note
The caller will NOT take the ownership of the returned date and time.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getType()

virtual CoverageType te::st::Coverage::getType ( ) const
pure virtual

It returns the coverage type.

For while, there are two kinds of Coverages: Point Coverage and Raster Coverage.

Returns
Returns the coverage type.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getValue() [1/4]

virtual void te::st::Coverage::getValue ( const te::gm::Point l,
boost::ptr_vector< te::dt::AbstractData > &  result 
) const
pure virtual

It returns the values associated to a given location.

This method returns the values of all properties of the coverage.

Parameters
lThe given location
resultThe returned values associated to a given location
Note
The caller will take the ownership of the returned value.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getValue() [2/4]

virtual std::unique_ptr<te::dt::AbstractData> te::st::Coverage::getValue ( const te::gm::Point l,
unsigned int  p = 0 
) const
pure virtual

It returns the value of the p-th property associated to a given location.

Parameters
lThe given location
pThe index of the property that will be considered.
Returns
Returns the value associated to a given location
Note
The caller will take the ownership of the returned value.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getValue() [3/4]

virtual void te::st::Coverage::getValue ( const te::gm::Polygon l,
unsigned int  p,
boost::ptr_vector< te::dt::AbstractData > &  result 
) const
pure virtual

It returns the values of the p-th property associated to the locations inside a given polygon.

Parameters
lThe given polygon
pThe desired property
resultThe returned values of the p-th property associated to the locations inside a given polygon
Note
The caller will take the ownership of the returned value.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.

◆ getValue() [4/4]

virtual void te::st::Coverage::getValue ( const te::gm::Polygon l,
boost::ptr_vector< te::dt::AbstractData > &  result 
) const
pure 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.

Parameters
lThe given polygon
resultThe returned values associated the locations inside a given polygon
Note
The caller will take the ownership of the returned value.

Implemented in te::st::PointCoverage, and te::st::RasterCoverage.


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