te::mnt::SplineInterpolationGrass Class Reference

#include <SplineGrass.h>

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

Public Member Functions

bool calculateGrid (double xMin, double yMin)
 
double dataInterpolateBicubic (double x, double y, double xMin, double yMin, bool &interp)
 
double dataInterpolateBilin (double x, double y, double xMin, double yMin, bool &interp)
 
bool generateGrid ()
 
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 initInterpolation (int beginLine, int endLine, int beginCol, int endCol)
 
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...
 
unsigned int nPointInterest ()
 
double pointsControlMean ()
 
bool run ()
 Calculate GRID \ return true or false. More...
 
void setControlPoints (double xMin, double yMin)
 
void setEnvelope (te::gm::Envelope &env)
 
void setInput (te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_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)
 
 SplineInterpolationGrass (unsigned int nPartsX, unsigned int nPartsY, unsigned int minPoints, double overlappin)
 Contructors. More...
 
 ~SplineInterpolationGrass ()
 Destructor. More...
 

Static Public Member Functions

static te::gm::LineStringpointListSimplify (te::gm::LineString *ls, double snap, double Zvalue)
 

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...
 
unsigned int m_BW
 
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::auto_ptr< te::da::DataSetTypem_inDsetType_point
 
std::auto_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_lambda
 
double m_mean
 Media da area local. More...
 
unsigned int m_minpoints
 minimum of points considered More...
 
std::vector< std::vector< double > > m_N
 Interpolation and least-square matrix. More...
 
double m_nodatavalue
 no data value More...
 
unsigned int m_nparameters
 
unsigned int m_nPartsX
 
unsigned int m_nPartsY
 number of parts considered in the x and y directions More...
 
unsigned int m_npoints
 Numero de pontos de interesse. More...
 
unsigned int m_nsplx
 Numero de colunas do spline. More...
 
unsigned int m_nsply
 Numero de linhas do spline. More...
 
std::vector< te::gm::Pointm_obsVect
 Interpolation and least-square vectors. More...
 
double m_overlapping
 overlap value considered More...
 
std::vector< double > m_parVect
 Interpolating and least-square vectors. More...
 
double m_passoHeight
 
double m_passoWidth
 
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...
 
std::vector< double > m_TN
 
double m_tolerance
 tolerance used to simplify lines More...
 

Private Member Functions

void nCorrectGrad ()
 
void node_x (double x, int &i_x, double &csi_x, double xMin, double deltaX)
 Ordinate node index computation. More...
 
void node_y (double y, int &i_y, double &csi_y, double yMin, double deltaY)
 Ordinate node index computation. More...
 
void normalDefBicubic (double xMin, double yMin)
 
void normalDefBilin (double xMin, double yMin)
 
int order (int i_x, int i_y, unsigned int yNum)
 Node order computation. More...
 
double phi (double csi_x, double csi_y)
 Design matrix coefficients computation. More...
 
double phi_3 (double csi)
 Design matrix coefficients computation. More...
 
double phi_33 (double csi_x, double csi_y)
 Design matrix coefficients computation. More...
 
double phi_34 (double csi_x, double csi_y)
 Design matrix coefficients computation. More...
 
double phi_4 (double csi)
 Design matrix coefficients computation. More...
 
double phi_43 (double csi_x, double csi_y)
 Design matrix coefficients computation. More...
 
double phi_44 (double csi_x, double csi_y)
 Design matrix coefficients computation. More...
 
bool tcholDec (std::vector< std::vector< double > > &)
 
bool tcholSolve ()
 

Static Private Member Functions

static bool AdjustLinear (te::gm::LineString *ptol, double maxDist)
 METHOD TO ADJUST A LINEAR CURVE TO A SET OF LINE POINTS. More...
 

Detailed Description

Definition at line 20 of file SplineGrass.h.

Constructor & Destructor Documentation

te::mnt::SplineInterpolationGrass::SplineInterpolationGrass ( unsigned int  nPartsX,
unsigned int  nPartsY,
unsigned int  minPoints,
double  overlappin 
)
inline

Contructors.

Definition at line 24 of file SplineGrass.h.

te::mnt::SplineInterpolationGrass::~SplineInterpolationGrass ( )
inline

Destructor.

Definition at line 28 of file SplineGrass.h.

Member Function Documentation

static bool te::mnt::SplineInterpolationGrass::AdjustLinear ( te::gm::LineString ptol,
double  maxDist 
)
staticprivate

METHOD TO ADJUST A LINEAR CURVE TO A SET OF LINE POINTS.

Parameters
ptpolis a pointer to a PointList
maxDistis the maximum distance to the line fitted for a set of points
Returns
FALSE if there is no memory available, the number of points are lower than 2 or maxDist == 0.0
TRUE if the curve is adjusted with no errors
bool te::mnt::SplineInterpolationGrass::calculateGrid ( double  xMin,
double  yMin 
)
double te::mnt::SplineInterpolationGrass::dataInterpolateBicubic ( double  x,
double  y,
double  xMin,
double  yMin,
bool &  interp 
)
double te::mnt::SplineInterpolationGrass::dataInterpolateBilin ( double  x,
double  y,
double  xMin,
double  yMin,
bool &  interp 
)
bool te::mnt::SplineInterpolationGrass::generateGrid ( )
bool te::mnt::CalculateGrid::GenerateGridSplineGrass ( )
inherited

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 ( )
inherited

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 
)
inherited
void te::mnt::SplineInterpolationGrass::initInterpolation ( int  beginLine,
int  endLine,
int  beginCol,
int  endCol 
)
void te::mnt::CalculateGrid::Interpolation ( te::gm::Point pg,
std::vector< te::gm::Point > &  points,
std::vector< double > &  distq 
)
inherited

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::Point pg,
std::vector< te::gm::Point > &  points,
std::vector< double > &  distq 
)
inherited

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::Point pg,
std::vector< te::gm::Point > &  points,
std::vector< double > &  distq 
)
inherited

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.

void te::mnt::SplineInterpolationGrass::nCorrectGrad ( )
private
void te::mnt::SplineInterpolationGrass::node_x ( double  x,
int &  i_x,
double &  csi_x,
double  xMin,
double  deltaX 
)
inlineprivate

Ordinate node index computation.

Definition at line 52 of file SplineGrass.h.

void te::mnt::SplineInterpolationGrass::node_y ( double  y,
int &  i_y,
double &  csi_y,
double  yMin,
double  deltaY 
)
inlineprivate

Ordinate node index computation.

Definition at line 61 of file SplineGrass.h.

void te::mnt::SplineInterpolationGrass::normalDefBicubic ( double  xMin,
double  yMin 
)
private
void te::mnt::SplineInterpolationGrass::normalDefBilin ( double  xMin,
double  yMin 
)
private
unsigned int te::mnt::SplineInterpolationGrass::nPointInterest ( )
inline

Definition at line 31 of file SplineGrass.h.

int te::mnt::SplineInterpolationGrass::order ( int  i_x,
int  i_y,
unsigned int  yNum 
)
inlineprivate

Node order computation.

Definition at line 70 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi ( double  csi_x,
double  csi_y 
)
inlineprivate

Design matrix coefficients computation.

Definition at line 99 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi_3 ( double  csi)
inlineprivate

Design matrix coefficients computation.

Definition at line 75 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi_33 ( double  csi_x,
double  csi_y 
)
inlineprivate

Design matrix coefficients computation.

Definition at line 83 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi_34 ( double  csi_x,
double  csi_y 
)
inlineprivate

Design matrix coefficients computation.

Definition at line 87 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi_4 ( double  csi)
inlineprivate

Design matrix coefficients computation.

Definition at line 79 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi_43 ( double  csi_x,
double  csi_y 
)
inlineprivate

Design matrix coefficients computation.

Definition at line 91 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::phi_44 ( double  csi_x,
double  csi_y 
)
inlineprivate

Design matrix coefficients computation.

Definition at line 95 of file SplineGrass.h.

static te::gm::LineString* te::mnt::SplineInterpolationGrass::pointListSimplify ( te::gm::LineString ls,
double  snap,
double  Zvalue 
)
static
double te::mnt::SplineInterpolationGrass::pointsControlMean ( )
inline

Definition at line 38 of file SplineGrass.h.

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

Calculate GRID \ return true or false.

void te::mnt::SplineInterpolationGrass::setControlPoints ( double  xMin,
double  yMin 
)
void te::mnt::CalculateGrid::setEnvelope ( te::gm::Envelope env)
inherited

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,
InputType  type 
)
inherited

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)
inherited

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

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

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)
inherited

Function used to set the Spatial Reference System ID

bool te::mnt::SplineInterpolationGrass::tcholDec ( std::vector< std::vector< double > > &  )
private
bool te::mnt::SplineInterpolationGrass::tcholSolve ( )
private

Member Data Documentation

KD_ADAPTATIVE_TREE* te::mnt::CalculateGrid::m_adaptativeTree
protectedinherited

Definition at line 152 of file CalculateGrid.h.

std::string te::mnt::CalculateGrid::m_atrZ_point
protectedinherited

Attribute used to calculate grid.

Definition at line 136 of file CalculateGrid.h.

std::string te::mnt::CalculateGrid::m_atrZ_sample
protectedinherited

Attribute used to calculate grid.

Definition at line 135 of file CalculateGrid.h.

unsigned int te::mnt::SplineInterpolationGrass::m_BW
protected

Definition at line 128 of file SplineGrass.h.

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

Definition at line 153 of file CalculateGrid.h.

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

Definition at line 138 of file CalculateGrid.h.

te::gm::Envelope te::mnt::CalculateGrid::m_env
protectedinherited

Attribute used to restrict the area to generate the raster.

Definition at line 125 of file CalculateGrid.h.

std::string te::mnt::CalculateGrid::m_inDsetName_point
protectedinherited

Definition at line 132 of file CalculateGrid.h.

std::string te::mnt::CalculateGrid::m_inDsetName_sample
protectedinherited

Definition at line 128 of file CalculateGrid.h.

std::auto_ptr<te::da::DataSetType> te::mnt::CalculateGrid::m_inDsetType_point
protectedinherited

Definition at line 133 of file CalculateGrid.h.

std::auto_ptr<te::da::DataSetType> te::mnt::CalculateGrid::m_inDsetType_sample
protectedinherited

Definition at line 129 of file CalculateGrid.h.

te::da::DataSourcePtr te::mnt::CalculateGrid::m_inDsrc_point
protectedinherited

Definition at line 131 of file CalculateGrid.h.

te::da::DataSourcePtr te::mnt::CalculateGrid::m_inDsrc_sample
protectedinherited

Definition at line 127 of file CalculateGrid.h.

Interpolator te::mnt::CalculateGrid::m_inter
protectedinherited

selected interpolation method

Definition at line 141 of file CalculateGrid.h.

double te::mnt::SplineInterpolationGrass::m_lambda
protected

Definition at line 131 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::m_mean
protected

Media da area local.

Definition at line 129 of file SplineGrass.h.

unsigned int te::mnt::SplineInterpolationGrass::m_minpoints
protected

minimum of points considered

Definition at line 123 of file SplineGrass.h.

std::vector< std::vector<double> > te::mnt::SplineInterpolationGrass::m_N
protected

Interpolation and least-square matrix.

Definition at line 134 of file SplineGrass.h.

double te::mnt::CalculateGrid::m_nodatavalue
protectedinherited

no data value

Definition at line 150 of file CalculateGrid.h.

unsigned int te::mnt::SplineInterpolationGrass::m_nparameters
protected

Definition at line 127 of file SplineGrass.h.

unsigned int te::mnt::SplineInterpolationGrass::m_nPartsX
protected

Definition at line 122 of file SplineGrass.h.

unsigned int te::mnt::SplineInterpolationGrass::m_nPartsY
protected

number of parts considered in the x and y directions

Definition at line 122 of file SplineGrass.h.

unsigned int te::mnt::SplineInterpolationGrass::m_npoints
protected

Numero de pontos de interesse.

Definition at line 130 of file SplineGrass.h.

unsigned int te::mnt::SplineInterpolationGrass::m_nsplx
protected

Numero de colunas do spline.

Definition at line 125 of file SplineGrass.h.

unsigned int te::mnt::SplineInterpolationGrass::m_nsply
protected

Numero de linhas do spline.

Definition at line 126 of file SplineGrass.h.

std::vector<te::gm::Point> te::mnt::SplineInterpolationGrass::m_obsVect
protected

Interpolation and least-square vectors.

Definition at line 132 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::m_overlapping
protected

overlap value considered

Definition at line 124 of file SplineGrass.h.

std::vector<double> te::mnt::SplineInterpolationGrass::m_parVect
protected

Interpolating and least-square vectors.

Definition at line 133 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::m_passoHeight
protected

Definition at line 131 of file SplineGrass.h.

double te::mnt::SplineInterpolationGrass::m_passoWidth
protected

Definition at line 131 of file SplineGrass.h.

int te::mnt::CalculateGrid::m_power
protectedinherited

power

Definition at line 143 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_radius
protectedinherited

radius

Definition at line 142 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_resx
protectedinherited

Definition at line 140 of file CalculateGrid.h.

double te::mnt::CalculateGrid::m_resy
protectedinherited

grid resolution in X and Y

Definition at line 140 of file CalculateGrid.h.

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

Definition at line 147 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_smoothM
protectedinherited

smooth factor used

Definition at line 145 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_srid
protectedinherited

Attribute with spatial reference information.

Definition at line 124 of file CalculateGrid.h.

int te::mnt::CalculateGrid::m_tension
protectedinherited

the tension spline factor considered in the spline fitting process

Definition at line 144 of file CalculateGrid.h.

std::vector<double> te::mnt::SplineInterpolationGrass::m_TN
protected

Definition at line 133 of file SplineGrass.h.

double te::mnt::CalculateGrid::m_tolerance
protectedinherited

tolerance used to simplify lines

Definition at line 149 of file CalculateGrid.h.


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