#include <SplineGrassMitasova.h>
Public Member Functions | |
| bool | calculateGrid () |
| 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::Raster > | Initialize (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 | setControlPoints (double xMin, double xMax, double yMin, double yMax, int nMax, double xOrigem, double yOrigem, double dnorm) |
| 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) |
| SplineInterpolationGrassMitasova (int minPoints=mitasovaMINPOINTS, double tension=mitasovaTENSION, double smooth=mitasovaSMOOTH) | |
| Contructors. More... | |
| virtual | ~SplineInterpolationGrassMitasova () |
| Destructor. More... | |
Protected Attributes | |
| KD_ADAPTATIVE_TREE * | m_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::DataSetType > | m_inDsetType_point |
| std::unique_ptr< te::da::DataSetType > | m_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::Raster * | m_rst |
| int | m_smoothM |
| smooth factor used More... | |
| int | m_srid |
| Attribute with spatial reference information. More... | |
| double | m_tolerance |
| tolerance used to simplify lines More... | |
Private Member Functions | |
| double | amax1 (double arg1, double arg2) |
| double | amin1 (double arg1, double arg2) |
| void | G_lubksb (std::vector< std::vector< double > > &a, int n, std::vector< int > &indx, std::vector< double > &b) |
| int | G_ludcmp (std::vector< std::vector< double > > &, int, std::vector< int > &, double &) |
| int | IL_check_at_points_2d (std::vector< double > &b, double &ertot, double zmin, double dnorm, double fi) |
| double | IL_crst (double r, double fi) |
| bool | IL_grid_calc (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, int KMAX2, std::vector< double > &b, double fi, double dnorm) |
| int | IL_matrix_create (std::vector< std::vector< double > > &matrix, std::vector< int > &indx, double fi, double rsm, int KMAX2) |
Private Attributes | |
| int | m_minimoPontos |
| std::vector< te::gm::Point > | m_pointsRegion |
| Control Points of grid region. More... | |
| double | m_smooth |
| double | m_tension |
Definition at line 20 of file SplineGrassMitasova.h.
| te::mnt::SplineInterpolationGrassMitasova::SplineInterpolationGrassMitasova | ( | int | minPoints = mitasovaMINPOINTS, |
| double | tension = mitasovaTENSION, |
||
| double | smooth = mitasovaSMOOTH |
||
| ) |
Contructors.
Definition at line 18 of file SplineGrassMitasova.cpp.
References m_minimoPontos, m_smooth, m_tension, and ~SplineInterpolationGrassMitasova().
|
virtualdefault |
Destructor.
Referenced by SplineInterpolationGrassMitasova().
|
private |
Definition at line 56 of file SplineGrassMitasova.cpp.
Referenced by calculateGrid(), and IL_matrix_create().
|
private |
Definition at line 67 of file SplineGrassMitasova.cpp.
Referenced by calculateGrid().
| bool te::mnt::SplineInterpolationGrassMitasova::calculateGrid | ( | ) |
Definition at line 325 of file SplineGrassMitasova.cpp.
References amax1(), amin1(), b, G_lubksb(), te::gm::Envelope::getLowerLeftX(), te::gm::Envelope::getLowerLeftY(), te::gm::Envelope::getUpperRightX(), te::gm::Envelope::getUpperRightY(), te::gm::Point::getZ(), IL_check_at_points_2d(), IL_grid_calc(), IL_matrix_create(), te::mnt::CalculateGrid::Initialize(), te::common::TaskProgress::isActive(), te::mnt::CalculateGrid::m_dataset, te::mnt::CalculateGrid::m_env, m_minimoPontos, m_pointsRegion, te::mnt::CalculateGrid::m_resx, m_smooth, m_tension, te::mnt::CalculateGrid::m_tolerance, te::common::TaskProgress::pulse(), mixture::rst, setControlPoints(), and te::common::TaskProgress::UNDEFINED.
Referenced by te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
private |
Definition at line 121 of file SplineGrassMitasova.cpp.
Referenced by calculateGrid().
|
private |
Definition at line 150 of file SplineGrassMitasova.cpp.
Referenced by IL_matrix_create().
|
inherited |
Method to calculate a grid from a vector of samples using a Spline (GRASS) fitting algorithm.
Definition at line 392 of file CalculateGrid.cpp.
|
inherited |
Method to calculate a grid from a vector of samples using a Spline (Mitasova) fitting algorithm.
Definition at line 397 of file CalculateGrid.cpp.
|
inlineinherited |
Definition at line 122 of file CalculateGrid.h.
Referenced by te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
inlineinherited |
Definition at line 121 of file CalculateGrid.h.
Referenced by te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
private |
Definition at line 459 of file SplineGrassMitasova.cpp.
References te::gm::Point::getX(), te::gm::Point::getY(), te::gm::Point::getZ(), IL_crst(), and m_pointsRegion.
Referenced by calculateGrid().
|
private |
Definition at line 78 of file SplineGrassMitasova.cpp.
References b.
Referenced by IL_check_at_points_2d(), IL_grid_calc(), and IL_matrix_create().
|
private |
Definition at line 505 of file SplineGrassMitasova.cpp.
References te::gm::Envelope::getLowerLeftX(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::gm::Envelope::getUpperRightY(), te::gm::Point::getX(), te::gm::Point::getY(), IL_crst(), te::mnt::CalculateGrid::m_env, te::mnt::CalculateGrid::m_max, te::mnt::CalculateGrid::m_min, te::mnt::CalculateGrid::m_nodatavalue, m_pointsRegion, te::mnt::CalculateGrid::m_resx, te::mnt::CalculateGrid::m_resy, te::mnt::CalculateGrid::m_rst, and te::rst::Raster::setValue().
Referenced by calculateGrid().
|
private |
Definition at line 221 of file SplineGrassMitasova.cpp.
References te::gm::A, amax1(), d, G_ludcmp(), te::gm::Point::getX(), te::gm::Point::getY(), IL_crst(), and m_pointsRegion.
Referenced by calculateGrid().
|
inherited |
Definition at line 41 of file CalculateGrid.cpp.
References te::mnt::AccumulatedDistance, compose::bands, te::sam::kdtree::AdaptativeIndex< KdTreeNode >::build(), te::dt::DOUBLE_TYPE, te::gm::GeometryCollection::getGeometryN(), te::gm::Envelope::getHeight(), te::gm::Envelope::getLowerLeftX(), te::gm::GeometryCollection::getNumGeometries(), te::gm::Envelope::getUpperRightY(), te::gm::Envelope::getWidth(), te::gm::Point::getX(), te::gm::Point::getY(), te::gm::Point::getZ(), te::rst::GrayIdxCInt, te::sa::Grid, te::mnt::CalculateGrid::m_adaptativeTree, te::mnt::CalculateGrid::m_atrZ_point, te::mnt::CalculateGrid::m_atrZ_sample, te::mnt::CalculateGrid::m_dataset, te::mnt::CalculateGrid::m_dsinfo, te::mnt::CalculateGrid::m_env, te::mnt::CalculateGrid::m_inDsetName_point, te::mnt::CalculateGrid::m_inDsetName_sample, te::mnt::CalculateGrid::m_inDsrc_point, te::mnt::CalculateGrid::m_inDsrc_sample, te::mnt::CalculateGrid::m_inter, te::mnt::CalculateGrid::m_nodatavalue, te::mnt::CalculateGrid::m_resx, te::mnt::CalculateGrid::m_resy, te::mnt::CalculateGrid::m_rst, te::mnt::CalculateGrid::m_srid, te::mnt::CalculateGrid::m_tolerance, te::rst::RasterFactory::make(), te::gm::MultiLineStringZType, te::gm::MultiPointZType, te::gm::PointZType, te::mnt::ReadPoints(), te::mnt::ReadSamples(), mixture::rst, te::mnt::CalculateGrid::setEnvelope(), te::gm::Point::setX(), te::gm::Point::setY(), te::gm::Point::setZ(), te::mnt::Spline, THRESHOLD, and te::mnt::Vizinho.
Referenced by calculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), and te::mnt::CalculateGrid::run().
|
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.
| pg | points to an point3d whose z value must be calculated |
| points | vector that contains points from point pg to the partition points |
| distq | points to a double vector that contains distance values from point pg to the partition points. |
Definition at line 244 of file CalculateGrid.cpp.
References te::mnt::CalculateGrid::Interpwq(), te::mnt::CalculateGrid::Interpwqz(), te::mnt::CalculateGrid::m_inter, te::mnt::CalculateGrid::m_nodatavalue, te::mnt::CalculateGrid::m_power, and te::gm::Point::setZ().
Referenced by te::mnt::CalculateGrid::run().
|
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.
Definition at line 305 of file CalculateGrid.cpp.
References te::gm::Point::getX(), te::gm::Point::getY(), te::mnt::CalculateGrid::m_nodatavalue, and te::mnt::CalculateGrid::m_power.
Referenced by te::mnt::CalculateGrid::Interpolation().
|
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.
Definition at line 345 of file CalculateGrid.cpp.
References te::gm::Point::getX(), te::gm::Point::getY(), te::mnt::CalculateGrid::m_nodatavalue, and te::mnt::CalculateGrid::m_power.
Referenced by te::mnt::CalculateGrid::Interpolation().
|
inherited |
Calculate GRID \ return true or false.
Definition at line 117 of file CalculateGrid.cpp.
References te::gm::Coord2D::getX(), te::gm::Coord2D::getY(), te::gm::Point::getZ(), te::mnt::CalculateGrid::Initialize(), te::mnt::CalculateGrid::Interpolation(), te::mnt::CalculateGrid::m_adaptativeTree, te::mnt::CalculateGrid::m_max, te::mnt::CalculateGrid::m_min, te::mnt::CalculateGrid::m_nodatavalue, te::mnt::CalculateGrid::m_radius, te::mnt::CalculateGrid::m_resx, te::mnt::CalculateGrid::m_resy, te::mnt::CalculateGrid::m_rst, te::sam::kdtree::AdaptativeIndex< KdTreeNode >::nearestNeighborSearch(), te::gm::PointZType, te::common::TaskProgress::pulse(), mixture::rst, te::rst::Raster::setValue(), te::gm::Point::setX(), te::gm::Point::setY(), te::gm::Point::setZ(), and te::common::TaskProgress::UNDEFINED.
Referenced by CalculateGrid(), and te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
| void te::mnt::SplineInterpolationGrassMitasova::setControlPoints | ( | double | xMin, |
| double | xMax, | ||
| double | yMin, | ||
| double | yMax, | ||
| int | nMax, | ||
| double | xOrigem, | ||
| double | yOrigem, | ||
| double | dnorm | ||
| ) |
Definition at line 28 of file SplineGrassMitasova.cpp.
References te::gm::Point::getX(), te::gm::Point::getY(), te::gm::Point::getZ(), te::mnt::CalculateGrid::m_dataset, m_pointsRegion, te::gm::PointZType, te::gm::Point::setX(), te::gm::Point::setY(), and te::gm::Point::setZ().
Referenced by calculateGrid().
|
inherited |
Function used to set the envelope parameter
Definition at line 236 of file CalculateGrid.cpp.
References te::gm::Envelope::getWidth(), te::mnt::CalculateGrid::m_env, and te::gm::Envelope::Union().
Referenced by te::mnt::CalculateGrid::Initialize().
|
inherited |
It sets the Datasource that is being used to generate TIN.
| inDsrc | The datasource being used. |
| inDsetName | datasource name |
| inDsetType | input DataSetType |
| type | Input type: Sample or Isoline |
Definition at line 190 of file CalculateGrid.cpp.
References te::mnt::Isolines, te::mnt::CalculateGrid::m_inDsetName_point, te::mnt::CalculateGrid::m_inDsetName_sample, te::mnt::CalculateGrid::m_inDsetType_point, te::mnt::CalculateGrid::m_inDsetType_sample, te::mnt::CalculateGrid::m_inDsrc_point, and te::mnt::CalculateGrid::m_inDsrc_sample.
Referenced by CalculateGrid(), and te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
inherited |
It sets the Datasource that is being used to save TIN.
Definition at line 209 of file CalculateGrid.cpp.
References te::mnt::CalculateGrid::m_dsinfo.
Referenced by CalculateGrid(), and te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
inherited |
It sets the parameters that is being used to save TIN.
| resx,resy | resolution X and Y. |
| gt | interpolator |
Definition at line 214 of file CalculateGrid.cpp.
References te::mnt::CalculateGrid::m_atrZ_point, te::mnt::CalculateGrid::m_atrZ_sample, te::mnt::CalculateGrid::m_inter, te::mnt::CalculateGrid::m_power, te::mnt::CalculateGrid::m_radius, te::mnt::CalculateGrid::m_resx, and te::mnt::CalculateGrid::m_resy.
Referenced by CalculateGrid(), and te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
inherited |
Function used to set the Spatial Reference System ID
Definition at line 231 of file CalculateGrid.cpp.
References te::mnt::CalculateGrid::m_srid.
Referenced by CalculateGrid(), and te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
|
protectedinherited |
Definition at line 154 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::Initialize(), te::mnt::CalculateGrid::run(), and te::mnt::CalculateGrid::~CalculateGrid().
|
protectedinherited |
Attribute used to calculate grid.
Definition at line 138 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
Attribute used to calculate grid.
Definition at line 137 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
Definition at line 155 of file CalculateGrid.h.
Referenced by calculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), te::mnt::CalculateGrid::Initialize(), setControlPoints(), and te::mnt::SplineInterpolationGrass::setControlPoints().
|
protectedinherited |
Definition at line 140 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setOutput().
|
protectedinherited |
Attribute used to restrict the area to generate the raster.
Definition at line 127 of file CalculateGrid.h.
Referenced by calculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setEnvelope().
|
protectedinherited |
Definition at line 134 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setInput().
|
protectedinherited |
Definition at line 130 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setInput().
|
protectedinherited |
Definition at line 135 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::setInput().
|
protectedinherited |
Definition at line 131 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::setInput().
|
protectedinherited |
Definition at line 133 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setInput().
|
protectedinherited |
Definition at line 129 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setInput().
|
protectedinherited |
selected interpolation method
Definition at line 143 of file CalculateGrid.h.
Referenced by te::mnt::SplineInterpolationGrass::calculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), te::mnt::CalculateGrid::Initialize(), te::mnt::SplineInterpolationGrass::initInterpolation(), te::mnt::CalculateGrid::Interpolation(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
Output DTM limits.
Definition at line 157 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), and te::mnt::CalculateGrid::run().
|
protectedinherited |
Definition at line 157 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), and te::mnt::CalculateGrid::run().
|
private |
Definition at line 34 of file SplineGrassMitasova.h.
Referenced by calculateGrid(), and SplineInterpolationGrassMitasova().
|
protectedinherited |
no data value
Definition at line 152 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), te::mnt::CalculateGrid::Initialize(), te::mnt::CalculateGrid::Interpolation(), te::mnt::CalculateGrid::Interpwq(), te::mnt::CalculateGrid::Interpwqz(), and te::mnt::CalculateGrid::run().
|
private |
Control Points of grid region.
Definition at line 47 of file SplineGrassMitasova.h.
Referenced by calculateGrid(), IL_check_at_points_2d(), IL_grid_calc(), IL_matrix_create(), and setControlPoints().
|
protectedinherited |
power
Definition at line 145 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::Interpolation(), te::mnt::CalculateGrid::Interpwq(), te::mnt::CalculateGrid::Interpwqz(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
radius
Definition at line 144 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::run(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
Definition at line 142 of file CalculateGrid.h.
Referenced by calculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), te::mnt::CalculateGrid::Initialize(), te::mnt::SplineInterpolationGrass::initInterpolation(), te::mnt::CalculateGrid::run(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
grid resolution in X and Y
Definition at line 142 of file CalculateGrid.h.
Referenced by te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), te::mnt::CalculateGrid::Initialize(), te::mnt::SplineInterpolationGrass::initInterpolation(), te::mnt::CalculateGrid::run(), and te::mnt::CalculateGrid::setParams().
|
protectedinherited |
Definition at line 149 of file CalculateGrid.h.
Referenced by te::mnt::SplineInterpolationGrass::generateGrid(), IL_grid_calc(), te::mnt::CalculateGrid::Initialize(), te::mnt::CalculateGrid::run(), and te::mnt::CalculateGrid::~CalculateGrid().
|
private |
Definition at line 36 of file SplineGrassMitasova.h.
Referenced by calculateGrid(), and SplineInterpolationGrassMitasova().
|
protectedinherited |
smooth factor used
Definition at line 147 of file CalculateGrid.h.
|
protectedinherited |
Attribute with spatial reference information.
Definition at line 126 of file CalculateGrid.h.
Referenced by te::mnt::CalculateGrid::CalculateGrid(), te::mnt::CalculateGrid::Initialize(), and te::mnt::CalculateGrid::setSRID().
|
private |
Definition at line 35 of file SplineGrassMitasova.h.
Referenced by calculateGrid(), and SplineInterpolationGrassMitasova().
|
protectedinherited |
tolerance used to simplify lines
Definition at line 151 of file CalculateGrid.h.
Referenced by calculateGrid(), te::mnt::CalculateGrid::CalculateGrid(), te::mnt::SplineInterpolationGrass::generateGrid(), and te::mnt::CalculateGrid::Initialize().