10 #ifndef __TERRALIB_MNT_INTERNAL_SPLINEGRASS_H
11 #define __TERRALIB_MNT_INTERNAL_SPLINEGRASS_H
25 m_nPartsX(nPartsX), m_nPartsY(nPartsY), m_minpoints(minPoints), m_overlapping(overlappin) {}
30 void setControlPoints(
double xMin,
double yMin);
33 void initInterpolation(
int beginLine,
int endLine,
int beginCol,
int endCol);
35 bool calculateGrid(
double xMin,
double yMin);
40 double dataInterpolateBicubic(
double x,
double y,
double xMin,
double yMin,
bool &interp);
42 double dataInterpolateBilin(
double x,
double y,
double xMin,
double yMin,
bool &interp);
52 void node_x(
double x,
int &i_x,
double &csi_x,
double xMin,
double deltaX)
54 i_x = (int)((x - xMin) / deltaX);
55 csi_x = (double)((x - xMin) - (i_x * deltaX));
61 void node_y(
double y,
int &i_y,
double &csi_y,
double yMin,
double deltaY)
63 i_y = (int)((y - yMin) / deltaY);
64 csi_y = (double)((y - yMin) - (i_y * deltaY));
70 int order(
int i_x,
int i_y,
unsigned int yNum){
return (i_y + i_x * (
int)yNum); }
75 double phi_3(
double csi) {
return ((pow(2 - csi, 3.) - pow(1 - csi, 3.) * 4) / 6.); }
79 double phi_4(
double csi){
return (pow(2 - csi, 3.) / 6.); }
83 double phi_33(
double csi_x,
double csi_y){
return (phi_3(csi_x) * phi_3(csi_y)); }
87 double phi_34(
double csi_x,
double csi_y){
return (phi_3(csi_x) * phi_4(csi_y)); }
91 double phi_43(
double csi_x,
double csi_y){
return (phi_4(csi_x) * phi_3(csi_y)); }
95 double phi_44(
double csi_x,
double csi_y){
return (phi_4(csi_x) * phi_4(csi_y)); }
99 double phi(
double csi_x,
double csi_y){
return ((1 - csi_x)*(1 - csi_y)); }
103 bool tcholDec(std::vector< std::vector<double> > &);
108 void normalDefBilin(
double xMin,
double yMin);
110 void normalDefBicubic(
double xMin,
double yMin);
133 std::vector<double>
m_TN, m_parVect;
134 std::vector< std::vector<double> >
m_N;
double m_mean
Media da area local.
int order(int i_x, int i_y, unsigned int yNum)
Node order computation.
unsigned int m_nsplx
Numero de colunas do spline.
double pointsControlMean()
double phi_3(double csi)
Design matrix coefficients computation.
unsigned int m_nPartsY
number of parts considered in the x and y directions
unsigned int nPointInterest()
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
std::vector< double > m_TN
double phi_34(double csi_x, double csi_y)
Design matrix coefficients computation.
double phi(double csi_x, double csi_y)
Design matrix coefficients computation.
~SplineInterpolationGrass()
Destructor.
LineString is a curve with linear interpolation between points.
void node_y(double y, int &i_y, double &csi_y, double yMin, double deltaY)
Ordinate node index computation.
unsigned int m_npoints
Numero de pontos de interesse.
unsigned int m_nsply
Numero de linhas do spline.
std::vector< te::gm::PointZ > m_obsVect
Interpolation and least-square vectors.
double phi_4(double csi)
Design matrix coefficients computation.
This file contains a class to calculate retangular grid from Samples. Adapted from SPRING...
double phi_43(double csi_x, double csi_y)
Design matrix coefficients computation.
std::vector< std::vector< double > > m_N
Interpolation and least-square matrix.
void node_x(double x, int &i_x, double &csi_x, double xMin, double deltaX)
Ordinate node index computation.
double phi_44(double csi_x, double csi_y)
Design matrix coefficients computation.
unsigned int m_nparameters
double m_overlapping
overlap value considered
unsigned int m_minpoints
minimum of points considered
SplineInterpolationGrass(unsigned int nPartsX, unsigned int nPartsY, unsigned int minPoints, double overlappin)
Contructors.
TEMNTEXPORT te::gm::LineString * pointListSimplify(te::gm::LineString *ls, double snap, double maxdist, double Zvalue)
double phi_33(double csi_x, double csi_y)
Design matrix coefficients computation.