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...
 
double getMax ()
 
double getMin ()
 
std::unique_ptr< te::rst::RasterInitialize (bool spline, unsigned int &nro_neighb, double &rx1, double &ry2, unsigned int &outputWidth, unsigned int &outputHeight)
 
void Interpolation (te::gm::Point &pg, std::vector< te::gm::Point > &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::Point &pg, std::vector< te::gm::Point > &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::Point &pg, std::vector< te::gm::Point > &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::unique_ptr< te::da::DataSetType > inDsetType, InputType type)
 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 &attriso, const std::string &attrpt, 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_atrZ_point
 Attribute used to calculate grid. More...
 
std::string m_atrZ_sample
 Attribute used to calculate grid. More...
 
std::vector< std::pair< te::gm::Coord2D, te::gm::Point > > 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_point
 
std::string m_inDsetName_sample
 
std::unique_ptr< te::da::DataSetTypem_inDsetType_point
 
std::unique_ptr< te::da::DataSetTypem_inDsetType_sample
 
te::da::DataSourcePtr m_inDsrc_point
 
te::da::DataSourcePtr m_inDsrc_sample
 
Interpolator m_inter
 selected interpolation method More...
 
double m_max
 Output DTM limits. More...
 
double m_min
 
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

◆ CalculateGrid()

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

Default constructor.

◆ ~CalculateGrid()

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

Member Function Documentation

◆ GenerateGridSplineGrass()

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

◆ GenerateGridSplineMitasova()

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

◆ getMax()

double te::mnt::CalculateGrid::getMax ( )
inline

Definition at line 122 of file CalculateGrid.h.

◆ getMin()

double te::mnt::CalculateGrid::getMin ( )
inline

Definition at line 121 of file CalculateGrid.h.

◆ Initialize()

std::unique_ptr<te::rst::Raster> te::mnt::CalculateGrid::Initialize ( bool  spline,
unsigned int &  nro_neighb,
double &  rx1,
double &  ry2,
unsigned int &  outputWidth,
unsigned int &  outputHeight 
)

◆ Interpolation()

void te::mnt::CalculateGrid::Interpolation ( te::gm::Point pg,
std::vector< te::gm::Point > &  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.

◆ Interpwq()

double te::mnt::CalculateGrid::Interpwq ( te::gm::Point pg,
std::vector< te::gm::Point > &  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.

◆ Interpwqz()

double te::mnt::CalculateGrid::Interpwqz ( te::gm::Point pg,
std::vector< te::gm::Point > &  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.

◆ run()

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

Calculate GRID \ return true or false.

◆ setEnvelope()

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

Function used to set the envelope parameter

◆ setInput()

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

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

◆ setOutput()

void te::mnt::CalculateGrid::setOutput ( std::map< std::string, std::string > &  dsinfo)

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

◆ setParams()

void te::mnt::CalculateGrid::setParams ( const std::string &  attriso,
const std::string &  attrpt,
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

◆ setSRID()

void te::mnt::CalculateGrid::setSRID ( int  srid)

Function used to set the Spatial Reference System ID

Member Data Documentation

◆ m_adaptativeTree

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

Definition at line 154 of file CalculateGrid.h.

◆ m_atrZ_point

std::string te::mnt::CalculateGrid::m_atrZ_point
protected

Attribute used to calculate grid.

Definition at line 138 of file CalculateGrid.h.

◆ m_atrZ_sample

std::string te::mnt::CalculateGrid::m_atrZ_sample
protected

Attribute used to calculate grid.

Definition at line 137 of file CalculateGrid.h.

◆ m_dataset

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

Definition at line 155 of file CalculateGrid.h.

◆ m_dsinfo

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

Definition at line 140 of file CalculateGrid.h.

◆ m_env

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

Attribute used to restrict the area to generate the raster.

Definition at line 127 of file CalculateGrid.h.

◆ m_inDsetName_point

std::string te::mnt::CalculateGrid::m_inDsetName_point
protected

Definition at line 134 of file CalculateGrid.h.

◆ m_inDsetName_sample

std::string te::mnt::CalculateGrid::m_inDsetName_sample
protected

Definition at line 130 of file CalculateGrid.h.

◆ m_inDsetType_point

std::unique_ptr<te::da::DataSetType> te::mnt::CalculateGrid::m_inDsetType_point
protected

Definition at line 135 of file CalculateGrid.h.

◆ m_inDsetType_sample

std::unique_ptr<te::da::DataSetType> te::mnt::CalculateGrid::m_inDsetType_sample
protected

Definition at line 131 of file CalculateGrid.h.

◆ m_inDsrc_point

te::da::DataSourcePtr te::mnt::CalculateGrid::m_inDsrc_point
protected

Definition at line 133 of file CalculateGrid.h.

◆ m_inDsrc_sample

te::da::DataSourcePtr te::mnt::CalculateGrid::m_inDsrc_sample
protected

Definition at line 129 of file CalculateGrid.h.

◆ m_inter

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

selected interpolation method

Definition at line 143 of file CalculateGrid.h.

◆ m_max

double te::mnt::CalculateGrid::m_max
protected

Output DTM limits.

Definition at line 157 of file CalculateGrid.h.

◆ m_min

double te::mnt::CalculateGrid::m_min
protected

Definition at line 157 of file CalculateGrid.h.

◆ m_nodatavalue

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

no data value

Definition at line 152 of file CalculateGrid.h.

◆ m_power

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

power

Definition at line 145 of file CalculateGrid.h.

◆ m_radius

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

radius

Definition at line 144 of file CalculateGrid.h.

◆ m_resx

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

Definition at line 142 of file CalculateGrid.h.

◆ m_resy

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

grid resolution in X and Y

Definition at line 142 of file CalculateGrid.h.

◆ m_rst

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

Definition at line 149 of file CalculateGrid.h.

◆ m_smoothM

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

smooth factor used

Definition at line 147 of file CalculateGrid.h.

◆ m_srid

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

Attribute with spatial reference information.

Definition at line 126 of file CalculateGrid.h.

◆ m_tension

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

the tension spline factor considered in the spline fitting process

Definition at line 146 of file CalculateGrid.h.

◆ m_tolerance

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

tolerance used to simplify lines

Definition at line 151 of file CalculateGrid.h.


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