| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Protected Member Functions | Protected Attributes
TeCoverage< T > Class Template Reference

A generic Coverage class. More...

`#include <TeCoverage.h>`

Inheritance diagram for TeCoverage< T >:

List of all members.

## Classes

class | iterator
| A generic Coverage iterator. More...

## Public Member Functions

| TeCoverage (TeCoverageParams &params, TeCoverageInterpolator< T > *interpolator=NULL)
| Constructor from parameters and interpolator.
virtual | ~TeCoverage ()
| Coverage destructor.
virtual void | init ()
| Initalize the coverage.
virtual void | clear ()
| Clear internal structures.
TeGeomRep | elemType ()
| Return the type of the geometry.
TeCoverageParams & | getParameters ()
| Return the coverage parameters.
TeCoverage< T >::iterator | begin (TePolygon &poly=TePolygon(), TeSpatialRelation relation=TeINTERSECTS)
| Return the beginning iterator.
TeCoverage< T >::iterator | end (TePolygon &poly=TePolygon(), TeSpatialRelation relation=TeINTERSECTS)
| Return the ending iterator.
void | evaluate (const TeCoord2D &location, std::vector< double > &value)
| Evaluate the value of this coverage at an arbitrary location.
void | evaluate (TeRaster &raster, const int rasterBand, const int coverageDimension, const TeBox &box=TeBox())
| Fill a region of a raster with interpolated coverage data.

## Protected Member Functions

TeCoverageInterpolator< T > * | createDefaultInterpolator ()
| Create a default interpolator.
std::vector< TeGeomValuePair < T > > & | selectGeomValuePairs (const TePolygon &poly, const TeSpatialRelation relation)
| Select generic geometry-value pairs from the coverage.

## Protected Attributes

TeCoverageParams & | params_
| stores information about this coverage
TeCoverageDecoder< T > * | decoder_
| provides access to the coverage data
TeCoverageInterpolator< T > * | interpolator_
| provides interpolation methods

## Detailed Description

### template<class T>
class TeCoverage< T >

A generic Coverage class.

Coverage is a way of representing geographic information that
  emphasizes relationships and the spatial distribution of earth phenomena, rather than emphasizing features of independent locations.

This class represents a generic Coverage, which is a Coverage
  with a generic geographic domain, e.g. a set of points or a set of surfaces. Each element of the domain is associated to a value vector that represents the different dimensions of the coverage information.

Each coverage is connected to a decoder, which provides a common
  interface for retrieving coverage data wherever it is stored.

The elements of the domain can be traversed and its values can be
  consulted using the coverage iterator. Also, the values on arbitrary locations can be consulted using interpolation methods.

See also:
  TeCoverageParams TeCoverageDecoder TeCoverageInterpolator

## Constructor & Destructor Documentation

template<class T >

TeCoverage< T >::TeCoverage | ( | TeCoverageParams & | params,
|  | TeCoverageInterpolator< T > * | interpolator = `NULL`
| ) |  | `[inline]`

Constructor from parameters and interpolator.

Construct a coverage object, but do not initialize the internal structures. The interpolator provided must be for exclusive use of this coverage, any external use of the interpolator is discouraged.

Parameters:

  params | information about the coverage
  interpolator | pointer to a coverage iterpolator

template<class T >

virtual TeCoverage< T >::~TeCoverage | ( |  | ) | `[inline, virtual]`

Coverage destructor.

Clear internal structures before destroying the coverage object.

## Member Function Documentation

template<class T >

TeCoverage<T>::iterator TeCoverage< T >::begin | ( | TePolygon & | poly = `TePolygon()`,
|  | TeSpatialRelation | relation = `TeINTERSECTS`
| ) |  | `[inline]`

Return the beginning iterator.

Return the beginning iterator for traversing the generic geometries
  that form the spatial domain of this coverage.

The polygon parameter may be used to define a selection area. If no
  polygon is provided, the selection area includes all the domain.

The relation parameter may be used to specify the kind of relation
  (e.g. intersection, crossing, overlapping) that holds between the selection area and the geometries to be selected . If no relation is provided, it defaults to intersection.

Parameters:

  poly | an instance of TePolygon representing a selection area
  relation | a spatial relation

Returns:
  the beginning iterator

template<class T >

virtual void TeCoverage< T >::clear | ( |  | ) | `[inline, virtual]`

Clear internal structures.

Clear internal structures such as de decoder and the interpolator.

template<class T >

TeCoverageInterpolator<T>* TeCoverage< T >::createDefaultInterpolator | ( |  | ) | `[inline, protected]`

Create a default interpolator.

Create a default interpolator. This method is used in case no other interpolator was provided on construction.

template<class T >

TeGeomRep TeCoverage< T >::elemType | ( |  | ) | `[inline]`

Return the type of the geometry.

Returns:
  the type of the geometry

template<class T >

TeCoverage<T>::iterator TeCoverage< T >::end | ( | TePolygon & | poly = `TePolygon()`,
|  | TeSpatialRelation | relation = `TeINTERSECTS`
| ) |  | `[inline]`

Return the ending iterator.

Return the beginning iterator for traversing the generic geometries
  that form the spatial domain of this coverage.

The polygon parameter may be used to define a selection area. If no
  polygon is provided, the selection area includes all the domain.

The relation parameter may be used to specify the kind of relation
  (e.g. intersection, crossing, overlapping) that holds between the selection area and the geometries to be selected . If no relation is provided, it defaults to intersection.

Parameters:

  poly | an instance of TePolygon representing a selection area
  relation | a spatial relation

Returns:
  the ending iterator

template<class T >

void TeCoverage< T >::evaluate | ( | TeRaster & | raster,
|  | const int | rasterBand,
|  | const int | coverageDimension,
|  | const TeBox & | box = `TeBox()`
| ) |  | `[inline]`

Fill a region of a raster with interpolated coverage data.

Fill the pixels of a squared region of a raster with
  coverage data, using an interpolation method.

Parameters:

  raster | the raster to be filled with coverage data
  rasterBand | the raster band to be filled
  coverageDimension | the coverage dimension to be evaluated
  box | defines the raster region to be filled

template<class T >

void TeCoverage< T >::evaluate | ( | const TeCoord2D & | location,
|  | std::vector< double > & | value
| ) |  | `[inline]`

Evaluate the value of this coverage at an arbitrary location.

Evaluate the value of this coverage at an arbitrary location, using the auxiliary interpolator object.

Parameters:

  position | the arbitrary location to be evaluated
  the | value vector, to be filled by this method

template<class T >

TeCoverageParams& TeCoverage< T >::getParameters | ( |  | ) | `[inline]`

Return the coverage parameters.

Returns:
  the coverage parameters

template<class T >

virtual void TeCoverage< T >::init | ( |  | ) | `[inline, virtual]`

Initalize the coverage.

Instantiate internal structures, preparing the coverage for actual use. Must be called before any attempt to read from the coverage.

template<class T >

std::vector<TeGeomValuePair<T> >& TeCoverage< T >::selectGeomValuePairs | ( | const TePolygon & | poly,
|  | const TeSpatialRelation | relation
| ) |  | `[inline, protected]`

Select generic geometry-value pairs from the coverage.

Select generic geometry-value pairs from the coverage, using the
  decoder to access the coverage data.

The polygon parameter defines a selection area and the relation
  parameter specifies the kind of relation (e.g. intersection, crossing, overlapping) that holds between the selection area and the geometries to be selected.

Parameters:

  poly | an instance of TePolygon representing a selection area
  relation | a spatial relation

## Member Data Documentation

template<class T >

TeCoverageDecoder<T>* TeCoverage< T >::decoder_`[protected]`

provides access to the coverage data

template<class T >

TeCoverageInterpolator<T>* TeCoverage< T >::interpolator_`[protected]`

provides interpolation methods

template<class T >

TeCoverageParams& TeCoverage< T >::params_`[protected]`

stores information about this coverage

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeCoverage.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines