te::mnt::CalculateGrid Class Reference

#include <CalculateGrid.h>

Inheritance diagram for te::mnt::CalculateGrid:
te::mnt::SplineInterpolationGrass te::mnt::SplineInterpolationGrassMitasova

Public Member Functions

 CalculateGrid ()
 Default constructor. More...
 
bool GenerateGridSplineGrass ()
 Method to calculate a grid from a vector of samples using a Spline (GRASS) fitting algorithm. More...
 
bool GenerateGridSplineMitasova ()
 Method to calculate a grid from a vector of samples using a Spline (Mitasova) fitting algorithm. More...
 
std::auto_ptr< te::rst::RasterInitialize (bool spline, unsigned int &nro_neighb, double &rx1, double &ry2, unsigned int &outputWidth, unsigned int &outputHeight)
 
void Interpolation (te::gm::PointZ &pg, std::vector< te::gm::PointZ > &points, std::vector< double > &distq)
 Interpolates the z value of the pg point3d. \ This method interpolates the z value of the pg point3d using the \ information on the current partition, the dist double vector and. More...
 
double Interpwq (te::gm::PointZ &pg, std::vector< te::gm::PointZ > &points, std::vector< double > &distq)
 Interpolates the z value of the pg point3d using an weighted average by quadrant. \ Implements the interpolator that uses the average, weighted by the inverse \ square distance, of the nearest neighbours by quadrant. More...
 
double Interpwqz (te::gm::PointZ &pg, std::vector< te::gm::PointZ > &points, std::vector< double > &distq)
 Interpolates the z value of the pg point3d using an weighted average by quadrant and by z values. \ Implements the interpolator tha uses the average, weighted by the inverse \ square distance, of the nearest neighbours by z values and by quadrant. \ This method accepts no repeated z values in the interpolation. More...
 
bool run ()
 Calculate GRID \ return true or false. More...
 
void setEnvelope (te::gm::Envelope &env)
 
void setInput (te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_ptr< te::da::DataSetType > inDsetType)
 It sets the Datasource that is being used to generate TIN. More...
 
void setOutput (std::map< std::string, std::string > &dsinfo)
 It sets the Datasource that is being used to save TIN. More...
 
void setParams (const std::string &attr, double resx, double resy, Interpolator gt, double rad, int pow)
 It sets the parameters that is being used to save TIN. More...
 
void setSRID (int srid)
 
 ~CalculateGrid ()
 

Protected Attributes

KD_ADAPTATIVE_TREEm_adaptativeTree
 
std::string m_attrZ
 Attribute used to calculate grid. More...
 
std::vector< std::pair< te::gm::Coord2D, te::gm::PointZ > > m_dataset
 
std::map< std::string, std::string > m_dsinfo
 
te::gm::Envelope m_env
 Attribute used to restrict the area to generate the raster. More...
 
std::string m_inDsetName
 
std::auto_ptr< te::da::DataSetTypem_inDsetType
 
te::da::DataSourcePtr m_inDsrc
 
Interpolator m_inter
 selected interpolation method More...
 
double m_nodatavalue
 no data value More...
 
int m_power
 power More...
 
double m_radius
 radius More...
 
double m_resx
 
double m_resy
 grid resolution in X and Y More...
 
te::rst::Rasterm_rst
 
int m_smoothM
 smooth factor used More...
 
int m_srid
 Attribute with spatial reference information. More...
 
int m_tension
 the tension spline factor considered in the spline fitting process More...
 
double m_tolerance
 tolerance used to simplify lines More...
 

Detailed Description

Definition at line 38 of file CalculateGrid.h.

Constructor & Destructor Documentation

te::mnt::CalculateGrid::CalculateGrid ( )

Default constructor.

te::mnt::CalculateGrid::~CalculateGrid ( )

Member Function Documentation

bool te::mnt::CalculateGrid::GenerateGridSplineGrass ( )

Method to calculate a grid from a vector of samples using a Spline (GRASS) fitting algorithm.

Returns
true when the z grid value is succesfully evaluated
false when a z grid value could not be evaluated or some error is encountered
bool te::mnt::CalculateGrid::GenerateGridSplineMitasova ( )

Method to calculate a grid from a vector of samples using a Spline (Mitasova) fitting algorithm.

Returns
true when the z grid value is succesfully evaluated
false when a z grid value could not be evaluated or some error is encountered
std::auto_ptr<te::rst::Raster> te::mnt::CalculateGrid::Initialize ( bool  spline,
unsigned int &  nro_neighb,
double &  rx1,
double &  ry2,
unsigned int &  outputWidth,
unsigned int &  outputHeight 
)
void te::mnt::CalculateGrid::Interpolation ( te::gm::PointZ pg,
std::vector< te::gm::PointZ > &  points,
std::vector< double > &  distq 
)

Interpolates the z value of the pg point3d. \ This method interpolates the z value of the pg point3d using the \ information on the current partition, the dist double vector and.

Parameters
pgpoints to an point3d whose z value must be calculated
pointsvector that contains points from point pg to the partition points
distqpoints to a double vector that contains distance values from point pg to the partition points.
double te::mnt::CalculateGrid::Interpwq ( te::gm::PointZ pg,
std::vector< te::gm::PointZ > &  points,
std::vector< double > &  distq 
)

Interpolates the z value of the pg point3d using an weighted average by quadrant. \ Implements the interpolator that uses the average, weighted by the inverse \ square distance, of the nearest neighbours by quadrant.

double te::mnt::CalculateGrid::Interpwqz ( te::gm::PointZ pg,
std::vector< te::gm::PointZ > &  points,
std::vector< double > &  distq 
)

Interpolates the z value of the pg point3d using an weighted average by quadrant and by z values. \ Implements the interpolator tha uses the average, weighted by the inverse \ square distance, of the nearest neighbours by z values and by quadrant. \ This method accepts no repeated z values in the interpolation.

bool te::mnt::CalculateGrid::run ( )

Calculate GRID \ return true or false.

void te::mnt::CalculateGrid::setEnvelope ( te::gm::Envelope env)

Function used to set the envelope parameter

void te::mnt::CalculateGrid::setInput ( te::da::DataSourcePtr  inDsrc,
std::string  inDsetName,
std::auto_ptr< te::da::DataSetType inDsetType 
)

It sets the Datasource that is being used to generate TIN.

Parameters
inDsrcThe datasource being used.
inDsetNamedatasource name
inDsetTypeinput DataSetType
typeInput type: Sample or Isoline
void te::mnt::CalculateGrid::setOutput ( std::map< std::string, std::string > &  dsinfo)

It sets the Datasource that is being used to save TIN.

void te::mnt::CalculateGrid::setParams ( const std::string &  attr,
double  resx,
double  resy,
Interpolator  gt,
double  rad,
int  pow 
)

It sets the parameters that is being used to save TIN.

Parameters
resx,resyresolution X and Y.
gtinterpolator
void te::mnt::CalculateGrid::setSRID ( int  srid)

Function used to set the Spatial Reference System ID

Member Data Documentation

KD_ADAPTATIVE_TREE* te::mnt::CalculateGrid::m_adaptativeTree
protected

Definition at line 146 of file CalculateGrid.h.

std::string te::mnt::CalculateGrid::m_attrZ
protected

Attribute used to calculate grid.

Definition at line 130 of file CalculateGrid.h.

std::vector<std::pair<te::gm::Coord2D, te::gm::PointZ> > te::mnt::CalculateGrid::m_dataset
protected

Definition at line 147 of file CalculateGrid.h.

std::map<std::string, std::string> te::mnt::CalculateGrid::m_dsinfo
protected

Definition at line 132 of file CalculateGrid.h.

te::gm::Envelope te::mnt::CalculateGrid::m_env
protected

Attribute used to restrict the area to generate the raster.

Definition at line 124 of file CalculateGrid.h.

std::string te::mnt::CalculateGrid::m_inDsetName
protected

Definition at line 127 of file CalculateGrid.h.

std::auto_ptr<te::da::DataSetType> te::mnt::CalculateGrid::m_inDsetType
protected

Definition at line 128 of file CalculateGrid.h.

te::da::DataSourcePtr te::mnt::CalculateGrid::m_inDsrc
protected

Definition at line 126 of file CalculateGrid.h.

Interpolator te::mnt::CalculateGrid::m_inter
protected

selected interpolation method

Definition at line 135 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_nodatavalue
protected

no data value

Definition at line 144 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_power
protected

power

Definition at line 137 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_radius
protected

radius

Definition at line 136 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_resx
protected

Definition at line 134 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_resy
protected

grid resolution in X and Y

Definition at line 134 of file CalculateGrid.h.

te::rst::Raster* te::mnt::CalculateGrid::m_rst
protected

Definition at line 141 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_smoothM
protected

smooth factor used

Definition at line 139 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_srid
protected

Attribute with spatial reference information.

Definition at line 123 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_tension
protected

the tension spline factor considered in the spline fitting process

Definition at line 138 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_tolerance
protected

tolerance used to simplify lines

Definition at line 143 of file CalculateGrid.h.


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