TerraLib 4.1
TeCoverageInterpolatorNN< T > Class Template Reference

Provides a Nearest Neighbour interpolation method for coverages. More...

#include <TeCoverageInterpolatorNN.h>

Inheritance diagram for TeCoverageInterpolatorNN< T >:
TeCoverageInterpolator< T >

List of all members.

Public Member Functions

virtual void setDecoder (TeCoverageDecoder< T > *decoder)
 Set the decoder.
virtual void evaluate (const TeCoord2D &position, std::vector< double > &value)
 Retrieve the coverage value at an arbitrary location.
virtual 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

virtual TeGeomValuePair< T > nearestNeighbour (const TeCoord2D &position, double radius=0)
 Find nearest generic geometry-value pair.
double distanceToGeom (const TeCoord2D &position, TePoint point)
 Evaluate distance from a position to a point.
double distanceToGeom (const TeCoord2D &position, TeLine2D line)
 Evaluate distance from a position to a line.
double distanceToGeom (const TeCoord2D &position, TePolygon poly)
 Evaluate distance from a position to a polygon.

Protected Attributes

double initialNeighbourhoodRadius_
 The initial radius used for interpolation.

Detailed Description

template<class T>
class TeCoverageInterpolatorNN< T >

Provides a Nearest Neighbour interpolation method for coverages.


Member Function Documentation

template<class T >
double TeCoverageInterpolatorNN< T >::distanceToGeom ( const TeCoord2D position,
TePoint  point 
) [inline, protected]

Evaluate distance from a position to a point.

template<class T >
double TeCoverageInterpolatorNN< T >::distanceToGeom ( const TeCoord2D position,
TePolygon  poly 
) [inline, protected]

Evaluate distance from a position to a polygon.

template<class T >
double TeCoverageInterpolatorNN< T >::distanceToGeom ( const TeCoord2D position,
TeLine2D  line 
) [inline, protected]

Evaluate distance from a position to a line.

template<class T >
virtual void TeCoverageInterpolatorNN< T >::evaluate ( const TeCoord2D position,
std::vector< double > &  value 
) [inline, virtual]

Retrieve the coverage value at an arbitrary location.

Retrieve the coverage value at an arbitrary location, using the
coverage decoder to access the coverage data.
This implementation looks for the generic geometry that is the
nearest neighbour of the position passed as parameter and returns the value associated to it.
Parameters:
positionthe arbitrary location to be evaluated
thevalue vector, to be filled by this method

Implements TeCoverageInterpolator< T >.

template<class T >
virtual void TeCoverageInterpolatorNN< T >::evaluate ( TeRaster raster,
const int  rasterBand,
const int  coverageDimension,
const TeBox box = TeBox() 
) [inline, virtual]

Fill a region of a raster with interpolated coverage data.

Fill the pixels of a squared region of a raster with coverage
data. The value of each pixel coordinate is retrieved from the coverage, using an interpolation method (nearest neighbour).
Parameters:
rasterthe raster to be filled with coverage data
rasterBandthe raster band to be filled
coverageDimensionthe coverage dimension to be evaluated
boxdefines the raster region to be filled

Implements TeCoverageInterpolator< T >.

template<class T >
virtual TeGeomValuePair<T> TeCoverageInterpolatorNN< T >::nearestNeighbour ( const TeCoord2D position,
double  radius = 0 
) [inline, protected, virtual]

Find nearest generic geometry-value pair.

Retrieve the generic geometry value-pair that is the nearest
neighbour of the arbitrary location passed as parameter.
The radius parameter is used to specify the size of the
neighbourhood to be checked first. If no neighbours can be found, the radius is increased until at least one neighbour is found.
Parameters:
positionan arbitrary location
radiusthe size of the neighbourhood to be checked initially.
template<class T >
virtual void TeCoverageInterpolatorNN< T >::setDecoder ( TeCoverageDecoder< T > *  decoder) [inline, virtual]

Set the decoder.

Parameters:
decoderthe coverage decoder

Reimplemented from TeCoverageInterpolator< T >.


Member Data Documentation

template<class T >
double TeCoverageInterpolatorNN< T >::initialNeighbourhoodRadius_ [protected]

The initial radius used for interpolation.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines