te::mnt::TINGeneration Class Reference

Class to generate TIN. More...

#include <TINGeneration.h>

Inheritance diagram for te::mnt::TINGeneration:
te::mnt::Tin

Public Member Functions

bool BuildTriangle (int32_t id, te::gm::LinearRing *lr, double *val, int32_t *right, int32_t *left, te::mnt::Ntype *type, double zmin, double zmax, bool &first, KD_TREE &nodetree, te::sam::rtree::Index< std::size_t > &linetree)
 
double getMax ()
 
double getMin ()
 
bool LoadTin (te::da::DataSourcePtr &inDsrc, std::string &inDsetName, double zmin=std::numeric_limits< double >::min(), double zmax=std::numeric_limits< double >::max())
 Method used to load a triangular network (TIN) More...
 
bool LoadTinQGIS (te::da::DataSourcePtr &inDsrc, std::string &inDsetName, double zmin, double zmax)
 Method used to load a triangular network (TIN) generated by QGIS. More...
 
bool run ()
 Generate TIN \ return true or false. More...
 
bool SaveTin (te::da::DataSourcePtr &outDsrc, std::string &outDsetName)
 
void setBreakLine (te::da::DataSourcePtr inDsrc, std::string inDsetName, std::unique_ptr< te::da::DataSetType > inDsetType, double tol)
 It sets the BreakLine Datasource that is being used to generate TIN. 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 setMaxdist (double maxdist)
 
void setMethod (int method)
 
void setMinedgesize (double minedgesize)
 
void setOutput (te::da::DataSourcePtr outDsrc, std::string dsname)
 It sets the Datasource that is being used to save TIN. More...
 
void setParams (const double &tolerance, const double &maxdist, const double &minedgesize, const std::string &atrz_iso, const std::string &atrz_pt)
 It sets the parameters to generate TIN. More...
 
void setSRID (int srid)
 
void setTolerance (double tolerance)
 
 TINGeneration ()
 Default constructor. More...
 
 ~TINGeneration ()
 

Protected Member Functions

bool borderUp ()
 
bool BreakNodeClosestPoints (int32_t nid, int32_t *rClstNids, int32_t *lClstNids)
 Method that searches the Break node closest points. More...
 
bool BreakNodeFirstDeriv ()
 Method that calculates the first derivatives in the nodes of a given break triangle. More...
 
bool BreakNodeSecondDeriv ()
 Method that calculates the second derivative at all triangulation break nodes. More...
 
bool BreakTriangleSecondDeriv ()
 Method that calculates the second derivatives in the nodes of a given break triangle. More...
 
te::gm::Point CalcNodeFirstDeriv (int32_t nodeId, int32_t clstNodes[CLNODES])
 Method that calculates the first derivative in a given node. More...
 
TinNode CalcNodeSecondDeriv (int32_t nodeId, int32_t clstNIds[CLNODES])
 Method that calculates the second derivative in a given node. More...
 
bool CalcTriangleSecondDeriv (std::vector< int32_t > &triangles, std::vector< te::gm::Point > &fderiv)
 Method that calculates the second derivatives in a node of a given triangle. More...
 
bool CalcZvalueAkima (int32_t triid, te::gm::Point &pt1, te::gm::Point &pt2)
 Method that evaluates Z values for pt1 and pt2 using the Akima polynomium fitted in a triangle. More...
 
bool CheckLines (int32_t trid)
 Method that check the lines in a triangulation. More...
 
bool CheckTopology ()
 Method that check the topology in a triangulation. More...
 
bool ContainsPoint (int32_t triangId, te::gm::Point &pt)
 Method that verifies if a triangle contains a given point. More...
 
bool CreateDelaunay ()
 Method that creates a Delaunay triangulation. More...
 
bool CreateInitialTriangles (size_t nsamples)
 
bool CreateMinAngleTriangulation ()
 Method used to create a Triangulation using the Minimum Angle Method. More...
 
bool DefineAkimaCoeficients (int32_t triid, double *coef)
 Method that defines the coefficients of the Akima polynomium fitted in a given triangle. More...
 
bool DefineAkimaCoeficients (int32_t triid, int32_t *nodesid, te::gm::Point *p3d, double *coef)
 Method that defines the coefficients of the Akima polynomium fitted in a given triangle. More...
 
bool DefineInterLinesColumns (int32_t *nodesid, int32_t &flin, int32_t &llin, int32_t &fcol, int32_t &lcol)
 Method that calculates the lines and the columns intercepted by a triangle. More...
 
bool DeleteNode (int32_t node)
 Method used to delete a node in a TIN (Triangular Irregular Network) More...
 
int32_t DuplicateTriangle (int32_t t, short n, int32_t v, int32_t *testLines)
 Method used to duplicate a triangle in a TIN (Triangular Irregular Network) More...
 
bool DupNeighTriangle (int32_t tv, int32_t an0, short, int32_t v, int32_t *testLines)
 Method used to duplicate a neighbour triangle in a TIN (Triangular Irregular Network) More...
 
int32_t ExchangePolygon (int32_t triangId, int32_t newPolyId, unsigned short edge)
 Method that exchanges polygon. More...
 
bool FillGridValue (int32_t triid, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol, double zvalue)
 
bool FindInterPoints (te::gm::Point &pf, te::gm::Point &pn, std::vector< te::gm::Point > &p3d, std::vector< bool > &fixed)
 Method fint the point that intersects two triangles containing points pf and pn. More...
 
std::vector< int32_t > FindLine (int32_t nid)
 Method that find a line containing a specific node. More...
 
int32_t FindLine (int32_t fnid, int32_t snid)
 Method that find a line given two nodes identification. More...
 
int32_t FindTriangle (te::gm::Point &ptr1)
 Method that finds a triangle containing a given point. More...
 
bool GenerateDelaunay (int32_t nt, int32_t ntbase, int32_t contr)
 Method that generates a Delaunay triangulation. More...
 
te::da::DataSetTypeGetDataSetType (std::string &outDsetName)
 
bool InsertBreakLines ()
 
bool InsertBreakNodes (te::gm::MultiLineString &breaklines)
 
bool InsertNode (int32_t nodeid, int type)
 Method used to insert a node in a TIN (Triangular Irregular Network) More...
 
bool InsertNodes (const te::gm::MultiPoint &mpt, const te::gm::MultiLineString &mls)
 
bool IsBreaklineSegment (int32_t linid)
 Method that veryfies if the Breakline is a segment. More...
 
bool IsIsolineSegment (int32_t linid)
 Method that veryfies if the Isoline is a segment. More...
 
bool IsNeighborOnIsoOrBreakline (int32_t triId, unsigned short nviz)
 
bool IsolinesConstrained ()
 Method that define the Constrained Isolines. More...
 
bool LoadTin ()
 Method used to load a triangular network (TIN) More...
 
bool ModifyBoundTriangles ()
 Method that modifies the bounds of Triangles. More...
 
te::gm::Geometryneigh_union (te::gm::Geometry *tri_union, int32_t tri, std::vector< int32_t > &used_tri_all, std::map< int32_t, te::gm::Polygon > &pol_tri)
 
bool NeighborsId (int32_t triangId, int32_t *neighsId)
 
int32_t NextNode (int32_t nodeId)
 Method that finds out which is the next node. More...
 
bool NodeClosestPoints (int32_t nid, int32_t *clstNids, bool useBrNode=true)
 Method that searches the closest points of a specific node. More...
 
bool NodeDerivatives ()
 Method that calculates the first and second derivatives in the nodes of a given triangle. More...
 
bool NodeExchange (int32_t oldNode, int32_t newNode)
 Method used to exchange two nodes in a TIN (Triangular Irregular Network) More...
 
bool NodeFirstDeriv ()
 Method that calculates the first derivatives in the nodes of a given triangle. More...
 
int32_t NodeId (int32_t triangId, short vertex)
 Method that reads the identification number of the nodes of a given triangle. More...
 
bool NodeLines (int32_t v, std::vector< int32_t > &linids)
 Method that includes a node in the tin line list. More...
 
bool NodeNodes (int32_t v, std::vector< int32_t > &nodids)
 Method that includes a node in the tin node list. More...
 
bool NodeOppositeLines (int32_t v, std::vector< int32_t > &linids)
 Method that find the oposite lines of a specific node. More...
 
bool NodeSecondDeriv ()
 Method that calculates the second derivative at all triangulation nodes. More...
 
bool NodesId (int32_t triangId, int32_t *nodeIds)
 Method that reads the identification number of the nodes of a given triangle. More...
 
int32_t NodeTriangle (int32_t v)
 Method that search a node in a triangulation. More...
 
bool NodeTriangles (int32_t v, std::vector< int32_t > &triangles)
 Method that includes a node in a triangle list. More...
 
bool NodeTriangles (int32_t nodeid, std::vector< int32_t > &rightri, std::vector< int32_t > &leftri)
 Method that find the triangle list sharing a given node. More...
 
bool OnIsolineSegment (int32_t linid, te::gm::Point &pt3d, bool &fixed)
 Method that checks if a point 3D is on the isoline segment. More...
 
int32_t OppositeEdge (int32_t triangId, int32_t nodeId)
 Method that reads the identification number of the opposite edge of a given node. More...
 
int32_t OppositeNode (int32_t triangId, int32_t linId)
 Method that reads the identification number of the opposite node of a given edge. More...
 
bool OrderLines ()
 Method that order lines. More...
 
int32_t PreviousNode (int32_t nodeId)
 Method that finds out which is the previous node. More...
 
size_t ReadBreakLines (te::gm::MultiPoint &mpt, te::gm::MultiLineString &isolines, std::string &geostype)
 
bool ReallocateVectors (size_t nSize)
 Method that reallocates Vectors. More...
 
bool ReCreateDelaunay ()
 Method that recreates a Delaunay triangulation. More...
 
bool ReGenerateDelaunay (int32_t nt, int32_t ntbase, int32_t contr)
 Method that regenerates a Delaunay triangulation. More...
 
bool RegeneratewithNewPoints (std::vector< te::gm::Point > &p3dl, std::vector< bool > &fixed)
 
bool SaveTin ()
 
bool TestAngleBetweenNormals (int32_t triId, short nviz)
 Method used to test the angle between two normals. More...
 
bool TestDelaunay (int32_t tri1Id, int32_t tri2Id, int32_t tri3Id)
 Method used to test if the triangulation follows the Delaunay rule. More...
 
bool TestDelaunay (int32_t tri1Id, int32_t tri2Id, int32_t tri3Id, int32_t tri4Id)
 Method used to test if the triangulation follows the Delaunay rule. More...
 
bool TestDelaunay (int32_t linId)
 Method used to test if the triangulation follows the Delaunay rule. More...
 
bool TestDelaunay (int32_t triId, short nviz)
 Method used to test if the triangulation follows the Delaunay rule. More...
 
bool TestFlatTriangles ()
 Method that test if has flat triangles and regenerate them. More...
 
bool TestIsolines (int iter)
 Method that test the Isolines. More...
 
bool TriangleFirstDeriv ()
 Method that calculates the first derivatives in the nodes of a given triangle. More...
 
bool TrianglePoints (int32_t triangId, te::gm::Point *vertex)
 Method that reads the vertex (points) of a given triangle. More...
 
bool TriangleSecondDeriv ()
 Method that calculates the second derivatives in the nodes of a given triangle. More...
 
bool TwoNewTriangles (int32_t t, int32_t nodeId, int32_t *testLines)
 Method used to create two new triangles in a TIN (Triangular Irregular Network) More...
 
bool UpdateTriangles (int32_t t, int32_t tv, int32_t ai)
 Method used to Update Triangles of a given triangulation. More...
 

Protected Attributes

std::string m_atrZ_point
 
std::string m_atrZ_sample
 
te::gm::Envelope m_env
 Attribute used to restrict the area to generate the samples. More...
 
int32_t m_fbnode
 First break node number. More...
 
std::string m_inDsetName_break
 
std::string m_inDsetName_point
 
std::string m_inDsetName_sample
 
std::unique_ptr< te::da::DataSetTypem_inDsetType_break
 
std::unique_ptr< te::da::DataSetTypem_inDsetType_point
 
std::unique_ptr< te::da::DataSetTypem_inDsetType_sample
 
te::da::DataSourcePtr m_inDsrc_break
 
te::da::DataSourcePtr m_inDsrc_point
 
te::da::DataSourcePtr m_inDsrc_sample
 
std::vector< TinLinem_line
 Triangulation lines vector. More...
 
size_t m_linesize
 Triangulation lines vector size. More...
 
int32_t m_lline
 Triangulation last line number. More...
 
int32_t m_lnode
 Triangulation last node number. More...
 
int32_t m_ltriang
 Triangulation last triangle number. More...
 
double m_max
 
double m_maxdist
 Triangulation lines simplification maximum distance. More...
 
int m_method
 Triangulation method Delanay or Smaller Angle. More...
 
double m_min
 
double m_minedgesize
 Triangulation edges minimum size. More...
 
std::vector< te::gm::Pointm_nblfderiv
 
std::vector< TinNodem_nblsderiv
 
std::vector< te::gm::Pointm_nbrfderiv
 
std::vector< TinNodem_nbrsderiv
 
std::vector< te::gm::Pointm_nfderiv
 
double m_nodatavalue
 
std::vector< TinNodem_node
 Triangulation nodes vector. More...
 
size_t m_nodesize
 Triangulation nodes vector size. More...
 
std::vector< TinNodem_nsderiv
 
std::string m_outDsetName
 
te::da::DataSourcePtr m_outDsrc
 
double m_resx
 
double m_resy
 
te::rst::Rasterm_rst
 
int m_srid
 Attribute with spatial reference information. More...
 
std::vector< te::gm::Pointm_tfderiv
 
double m_tolerance
 Triangulation lines simplification tolerance. More...
 
double m_tolerance_break
 Triangulation breaklines simplification tolerance. More...
 
std::vector< TinTriangm_triang
 Triangulation triangles vector. More...
 
size_t m_triangsize
 Triangulation triangles vector size. More...
 
std::vector< TinNodem_tsderiv
 

Detailed Description

Class to generate TIN.

Definition at line 37 of file TINGeneration.h.

Constructor & Destructor Documentation

◆ TINGeneration()

te::mnt::TINGeneration::TINGeneration ( )

Default constructor.

◆ ~TINGeneration()

te::mnt::TINGeneration::~TINGeneration ( )

Member Function Documentation

◆ borderUp()

bool te::mnt::TINGeneration::borderUp ( )
protected

◆ BreakNodeClosestPoints()

bool te::mnt::Tin::BreakNodeClosestPoints ( int32_t  nid,
int32_t *  rClstNids,
int32_t *  lClstNids 
)
protectedinherited

Method that searches the Break node closest points.

Parameters
nidis the node identification number
rClstNidsis a pointer to a list of right node identificators
lClstNidsis a pointer to a list of left node identificators
Returns
TRUE if the points are found with no errors or FALSE otherwise

◆ BreakNodeFirstDeriv()

bool te::mnt::Tin::BreakNodeFirstDeriv ( )
protectedinherited

Method that calculates the first derivatives in the nodes of a given break triangle.

Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ BreakNodeSecondDeriv()

bool te::mnt::Tin::BreakNodeSecondDeriv ( )
protectedinherited

Method that calculates the second derivative at all triangulation break nodes.

Returns
TRUE if the derivatives are calculated with no errors or False otherwise

◆ BreakTriangleSecondDeriv()

bool te::mnt::Tin::BreakTriangleSecondDeriv ( )
protectedinherited

Method that calculates the second derivatives in the nodes of a given break triangle.

Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ BuildTriangle()

bool te::mnt::Tin::BuildTriangle ( int32_t  id,
te::gm::LinearRing lr,
double *  val,
int32_t *  right,
int32_t *  left,
te::mnt::Ntype type,
double  zmin,
double  zmax,
bool &  first,
KD_TREE nodetree,
te::sam::rtree::Index< std::size_t > &  linetree 
)
inherited

◆ CalcNodeFirstDeriv()

te::gm::Point te::mnt::Tin::CalcNodeFirstDeriv ( int32_t  nodeId,
int32_t  clstNodes[CLNODES] 
)
protectedinherited

Method that calculates the first derivative in a given node.

Parameters
nodeidis the node identification number
clstNodesis the vector of a list of nodes)
Returns
a Point object containing the first derivative in x and y directions

◆ CalcNodeSecondDeriv()

TinNode te::mnt::Tin::CalcNodeSecondDeriv ( int32_t  nodeId,
int32_t  clstNIds[CLNODES] 
)
protectedinherited

Method that calculates the second derivative in a given node.

Parameters
nodeidis the node identification number
clstNIdsis the vector of a list of nodes identification
Returns
a Point object containing the first derivative in x and y directions

◆ CalcTriangleSecondDeriv()

bool te::mnt::Tin::CalcTriangleSecondDeriv ( std::vector< int32_t > &  triangles,
std::vector< te::gm::Point > &  fderiv 
)
protectedinherited

Method that calculates the second derivatives in a node of a given triangle.

Parameters
trianglesis a pointer to a list of triangle identificators (SIDList object)
fderivis a pointer to a Point object representing the first derivative in x and y directions
Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ CalcZvalueAkima()

bool te::mnt::Tin::CalcZvalueAkima ( int32_t  triid,
te::gm::Point pt1,
te::gm::Point pt2 
)
protectedinherited

Method that evaluates Z values for pt1 and pt2 using the Akima polynomium fitted in a triangle.

Parameters
triidis the triangle identificator number
pt1is a pointer to a Point3d object
pt2is a pointer to a Point3d object
Returns
TRUE always

◆ CheckLines()

bool te::mnt::Tin::CheckLines ( int32_t  trid)
protectedinherited

Method that check the lines in a triangulation.

Returns
TRUE if the lines was checked with no errors or FALSE otherwise

◆ CheckTopology()

bool te::mnt::Tin::CheckTopology ( )
protectedinherited

Method that check the topology in a triangulation.

Returns
TRUE if the topology was checked with no errors or FALSE otherwise

◆ ContainsPoint()

bool te::mnt::Tin::ContainsPoint ( int32_t  triangId,
te::gm::Point pt 
)
protectedinherited

Method that verifies if a triangle contains a given point.

Parameters
triangIdis the triangle identification number
ptis a pointer to a te::gm::PointZ object
Returns
TRUE if the point is in the triangle or FALSE (-1L)otherwise

◆ CreateDelaunay()

bool te::mnt::TINGeneration::CreateDelaunay ( )
protected

Method that creates a Delaunay triangulation.

Returns
TRUE if the triangulation is created with no errors or False otherwise

◆ CreateInitialTriangles()

bool te::mnt::TINGeneration::CreateInitialTriangles ( size_t  nsamples)
protected

Create the two initial triangles, based on box.

◆ CreateMinAngleTriangulation()

bool te::mnt::TINGeneration::CreateMinAngleTriangulation ( )
protected

Method used to create a Triangulation using the Minimum Angle Method.

Returns
TRUE if the triangulation is created with no errors or FALSE otherwise

◆ DefineAkimaCoeficients() [1/2]

bool te::mnt::Tin::DefineAkimaCoeficients ( int32_t  triid,
double *  coef 
)
protectedinherited

Method that defines the coefficients of the Akima polynomium fitted in a given triangle.

Parameters
triidis the triangle identification number
coefis a pointer to a double vector containing the polynomium coefficients
Returns
TRUE if the coefficients are determined with no errors or FALSE otherwise

◆ DefineAkimaCoeficients() [2/2]

bool te::mnt::Tin::DefineAkimaCoeficients ( int32_t  triid,
int32_t *  nodesid,
te::gm::Point p3d,
double *  coef 
)
protectedinherited

Method that defines the coefficients of the Akima polynomium fitted in a given triangle.

Parameters
triidis the triangle identification number
nodesidis the list of triangle nodes identification
p3dis a pointer to a Point3d object
coefis a pointer to a double vector containing the polynomium coefficients
Returns
TRUE if the coefficients are determined with no errors or FALSE otherwise

◆ DefineInterLinesColumns()

bool te::mnt::Tin::DefineInterLinesColumns ( int32_t *  nodesid,
int32_t &  flin,
int32_t &  llin,
int32_t &  fcol,
int32_t &  lcol 
)
protectedinherited

Method that calculates the lines and the columns intercepted by a triangle.

Parameters
gridis a pointer to a grid object that will be created
nodesidis a vector with nodes identification of the current triangle
flinand llin are the first and the last lines (rows) of the grid
fcoland lcol are the first and the last columns of the grid
Returns
TRUE if the gradient grid is filled or FALSE otherwise

◆ DeleteNode()

bool te::mnt::TINGeneration::DeleteNode ( int32_t  node)
protected

Method used to delete a node in a TIN (Triangular Irregular Network)

Parameters
nodeis the node identification number
Returns
true if the node is deleted with no errors or false otherwise

◆ DuplicateTriangle()

int32_t te::mnt::TINGeneration::DuplicateTriangle ( int32_t  t,
short  n,
int32_t  v,
int32_t *  testLines 
)
protected

Method used to duplicate a triangle in a TIN (Triangular Irregular Network)

Parameters
tis a triangle identification number
nis the node identification number
vis a vertex identification number
testLinesis a pointer to a vector with number of lines to be tested
Returns
id of new edge the duplicated triangles with no errors or -1 otherwise

◆ DupNeighTriangle()

bool te::mnt::TINGeneration::DupNeighTriangle ( int32_t  tv,
int32_t  an0,
short  ,
int32_t  v,
int32_t *  testLines 
)
protected

Method used to duplicate a neighbour triangle in a TIN (Triangular Irregular Network)

Parameters
tvis a triangle identification number
an0is an edge identification number
vis a vertex identification number
testLinesis a pointer to a vector with number of lines to be tested
Returns
true if the neighbor triangle is duplicated with no errors or false otherwise

◆ ExchangePolygon()

int32_t te::mnt::TINGeneration::ExchangePolygon ( int32_t  triangId,
int32_t  newPolyId,
unsigned short  edge 
)
protected

Method that exchanges polygon.

Parameters
triangIdis the triangle identification number
newPolyIdis the new Polygon identification number
edgeis the edge number of the triangle
Returns
the line identification

◆ FillGridValue()

bool te::mnt::Tin::FillGridValue ( int32_t  triid,
int32_t  flin,
int32_t  llin,
int32_t  fcol,
int32_t  lcol,
double  zvalue 
)
protectedinherited

◆ FindInterPoints()

bool te::mnt::TINGeneration::FindInterPoints ( te::gm::Point pf,
te::gm::Point pn,
std::vector< te::gm::Point > &  p3d,
std::vector< bool > &  fixed 
)
protected

Method fint the point that intersects two triangles containing points pf and pn.

Parameters
pfis a pointer to the first point
pnis a pointer to the last point
p3dis a pointer to a list of Point3d objects
Returns
TRUE if the point is found with no errors or FALSE otherwise

◆ FindLine() [1/2]

std::vector<int32_t> te::mnt::Tin::FindLine ( int32_t  nid)
protectedinherited

Method that find a line containing a specific node.

Parameters
nidis the node identification number
Returns
the number of the line if it was found with no errors or FALSE (-1L) otherwise

◆ FindLine() [2/2]

int32_t te::mnt::Tin::FindLine ( int32_t  fnid,
int32_t  snid 
)
protectedinherited

Method that find a line given two nodes identification.

Parameters
fnidis the first node identification number
snidis the second node identification number
Returns
the number of the line if it was found with no errors or FALSE (-1L) otherwise

◆ FindTriangle()

int32_t te::mnt::Tin::FindTriangle ( te::gm::Point ptr1)
protectedinherited

Method that finds a triangle containing a given point.

Parameters
ptr1is a pointer to a Point object
Returns
true if the triangle was found or false (-1L)otherwise

◆ GenerateDelaunay()

bool te::mnt::TINGeneration::GenerateDelaunay ( int32_t  nt,
int32_t  ntbase,
int32_t  contr 
)
protected

Method that generates a Delaunay triangulation.

Parameters
ntis the triangle number
ntbaseis the base triangle number
contris a counter
Returns
TRUE if the triangulation is generated with no errors or False otherwise

◆ GetDataSetType()

te::da::DataSetType* te::mnt::Tin::GetDataSetType ( std::string &  outDsetName)
protectedinherited

◆ getMax()

double te::mnt::Tin::getMax ( )
inlineinherited

Definition at line 307 of file Tin.h.

◆ getMin()

double te::mnt::Tin::getMin ( )
inlineinherited

Definition at line 306 of file Tin.h.

◆ InsertBreakLines()

bool te::mnt::TINGeneration::InsertBreakLines ( )
protected

◆ InsertBreakNodes()

bool te::mnt::TINGeneration::InsertBreakNodes ( te::gm::MultiLineString breaklines)
protected

◆ InsertNode()

bool te::mnt::TINGeneration::InsertNode ( int32_t  nodeid,
int  type 
)
protected

Method used to insert a node in a TIN (Triangular Irregular Network)

Parameters
nodeIdis the node identification number
typeis the node type (0 - if Delaunay)
Returns
true if the node is inserted with no errors or false otherwise

◆ InsertNodes()

bool te::mnt::TINGeneration::InsertNodes ( const te::gm::MultiPoint mpt,
const te::gm::MultiLineString mls 
)
protected

Convert samples to nodes and insert them in Tin. If farther than a tolerance from the closest point.

◆ IsBreaklineSegment()

bool te::mnt::TINGeneration::IsBreaklineSegment ( int32_t  linid)
protected

Method that veryfies if the Breakline is a segment.

Parameters
linidis the line identification number
Returns
TRUE if the breakline is a segment or False otherwise

◆ IsIsolineSegment()

bool te::mnt::TINGeneration::IsIsolineSegment ( int32_t  linid)
protected

Method that veryfies if the Isoline is a segment.

Parameters
linidis the line identification number
Returns
TRUE if the isoline is a segment or False otherwise

◆ IsNeighborOnIsoOrBreakline()

bool te::mnt::TINGeneration::IsNeighborOnIsoOrBreakline ( int32_t  triId,
unsigned short  nviz 
)
protected

◆ IsolinesConstrained()

bool te::mnt::TINGeneration::IsolinesConstrained ( )
protected

Method that define the Constrained Isolines.

Returns
TRUE if the Isolines are defined or FALSE otherwise

◆ LoadTin() [1/2]

bool te::mnt::TINGeneration::LoadTin ( )
protected

Method used to load a triangular network (TIN)

Returns
true if the TIN is loaded with no errors or false otherwise

◆ LoadTin() [2/2]

bool te::mnt::Tin::LoadTin ( te::da::DataSourcePtr inDsrc,
std::string &  inDsetName,
double  zmin = std::numeric_limits< double >::min(),
double  zmax = std::numeric_limits< double >::max() 
)
inherited

Method used to load a triangular network (TIN)

Returns
true if the TIN is loaded with no errors or false otherwise

◆ LoadTinQGIS()

bool te::mnt::Tin::LoadTinQGIS ( te::da::DataSourcePtr inDsrc,
std::string &  inDsetName,
double  zmin,
double  zmax 
)
inherited

Method used to load a triangular network (TIN) generated by QGIS.

Returns
true if the TIN is loaded with no errors or false otherwise

◆ ModifyBoundTriangles()

bool te::mnt::TINGeneration::ModifyBoundTriangles ( )
protected

Method that modifies the bounds of Triangles.

Returns
TRUE if the triangulation is generated with no errors or False otherwise

◆ neigh_union()

te::gm::Geometry* te::mnt::TINGeneration::neigh_union ( te::gm::Geometry tri_union,
int32_t  tri,
std::vector< int32_t > &  used_tri_all,
std::map< int32_t, te::gm::Polygon > &  pol_tri 
)
protected

◆ NeighborsId()

bool te::mnt::Tin::NeighborsId ( int32_t  triangId,
int32_t *  neighsId 
)
protectedinherited

◆ NextNode()

int32_t te::mnt::Tin::NextNode ( int32_t  nodeId)
protectedinherited

Method that finds out which is the next node.

Parameters
nodeIdis the node identification number
Returns
the number of the next node

◆ NodeClosestPoints()

bool te::mnt::Tin::NodeClosestPoints ( int32_t  nid,
int32_t *  clstNids,
bool  useBrNode = true 
)
protectedinherited

Method that searches the closest points of a specific node.

Parameters
nidis the node identification number
clstNidsis a pointer to a list of closest node identificators
useBrNodeis the break nodeidentification
Returns
TRUE if the points are found with no errors or FALSE otherwise

◆ NodeDerivatives()

bool te::mnt::Tin::NodeDerivatives ( )
protectedinherited

Method that calculates the first and second derivatives in the nodes of a given triangle.

Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ NodeExchange()

bool te::mnt::TINGeneration::NodeExchange ( int32_t  oldNode,
int32_t  newNode 
)
protected

Method used to exchange two nodes in a TIN (Triangular Irregular Network)

Parameters
oldNnodeis the old node identification number
newNnodeis the new node identification number
Returns
true if the nodes are exchanged with no errors or false otherwise

◆ NodeFirstDeriv()

bool te::mnt::Tin::NodeFirstDeriv ( )
protectedinherited

Method that calculates the first derivatives in the nodes of a given triangle.

Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ NodeId()

int32_t te::mnt::Tin::NodeId ( int32_t  triangId,
short  vertex 
)
protectedinherited

Method that reads the identification number of the nodes of a given triangle.

Parameters
triangIdis the triangle identification number
vertexis the number of the vertex to be considered
Returns
the node identification related to the vertex

◆ NodeLines()

bool te::mnt::Tin::NodeLines ( int32_t  v,
std::vector< int32_t > &  linids 
)
protectedinherited

Method that includes a node in the tin line list.

Parameters
vis the node identificator number
linidsis a pointer to a list of line identificators
Returns
TRUE if the node is included with no errors or FALSE otherwise

◆ NodeNodes()

bool te::mnt::Tin::NodeNodes ( int32_t  v,
std::vector< int32_t > &  nodids 
)
protectedinherited

Method that includes a node in the tin node list.

Parameters
vis the node identification number
nodidsis a pointer to a list of node identificators
Returns
TRUE if the node is included with no errors or FALSE otherwise

◆ NodeOppositeLines()

bool te::mnt::Tin::NodeOppositeLines ( int32_t  v,
std::vector< int32_t > &  linids 
)
protectedinherited

Method that find the oposite lines of a specific node.

Parameters
vis the node identification number
linidsis pointer to a list of line identificators
Returns
true if the line is found with no errors or false otherwise

◆ NodeSecondDeriv()

bool te::mnt::Tin::NodeSecondDeriv ( )
protectedinherited

Method that calculates the second derivative at all triangulation nodes.

Returns
TRUE if the derivatives are calculated with no errors or False otherwise

◆ NodesId()

bool te::mnt::Tin::NodesId ( int32_t  triangId,
int32_t *  nodeIds 
)
protectedinherited

Method that reads the identification number of the nodes of a given triangle.

Parameters
triangIdis the triangle identification number
nodesIdsis a pointer to a list of node identification numbers
Returns
TRUE always

◆ NodeTriangle()

int32_t te::mnt::Tin::NodeTriangle ( int32_t  v)
protectedinherited

Method that search a node in a triangulation.

Parameters
vis the node identification number
Returns
the right or left polygon of a line containing v or FALSE (-1L) otherwise

◆ NodeTriangles() [1/2]

bool te::mnt::Tin::NodeTriangles ( int32_t  v,
std::vector< int32_t > &  triangles 
)
protectedinherited

Method that includes a node in a triangle list.

Parameters
vis the node identification number
trianglesis pointer to a vetor of triangles
Returns
TRUE if the node is included with no errors or FALSE otherwise

◆ NodeTriangles() [2/2]

bool te::mnt::Tin::NodeTriangles ( int32_t  nodeid,
std::vector< int32_t > &  rightri,
std::vector< int32_t > &  leftri 
)
protectedinherited

Method that find the triangle list sharing a given node.

Parameters
nodeidis the node identification number
rightriis a pointer to the triangles at right side
lefttriis a pointer to the triangles at left side
Returns
TRUE if the lists are find with no errors or FALSE otherwise

◆ OnIsolineSegment()

bool te::mnt::TINGeneration::OnIsolineSegment ( int32_t  linid,
te::gm::Point pt3d,
bool &  fixed 
)
protected

Method that checks if a point 3D is on the isoline segment.

Parameters
linidis the line identification number
pt3dis a pointer to a list of Point3D objects
Returns
TRUE if the point is on the isoline segment or FALSE otherwise

◆ OppositeEdge()

int32_t te::mnt::Tin::OppositeEdge ( int32_t  triangId,
int32_t  nodeId 
)
protectedinherited

Method that reads the identification number of the opposite edge of a given node.

Parameters
triangIdis the triangle identification number
nodeIdis the node identification number
Returns
the opposite edge identification considering the nodeId or -1 if error

◆ OppositeNode()

int32_t te::mnt::Tin::OppositeNode ( int32_t  triangId,
int32_t  linId 
)
protectedinherited

Method that reads the identification number of the opposite node of a given edge.

Parameters
triangIdis the triangle identification number
linIdis the line identification number
Returns
the opposite node identification considering the linId

◆ OrderLines()

bool te::mnt::TINGeneration::OrderLines ( )
protected

Method that order lines.

Returns
TRUE if the lines were ordered with no errors or FALSE otherwise

◆ PreviousNode()

int32_t te::mnt::Tin::PreviousNode ( int32_t  nodeId)
protectedinherited

Method that finds out which is the previous node.

Parameters
nodeIdis the node identification number
Returns
the number of the previous node

◆ ReadBreakLines()

size_t te::mnt::TINGeneration::ReadBreakLines ( te::gm::MultiPoint mpt,
te::gm::MultiLineString isolines,
std::string &  geostype 
)
protected

◆ ReallocateVectors()

bool te::mnt::Tin::ReallocateVectors ( size_t  nSize)
protectedinherited

Method that reallocates Vectors.

Parameters
nSizeis the vector size
Returns
true always

◆ ReCreateDelaunay()

bool te::mnt::TINGeneration::ReCreateDelaunay ( )
protected

Method that recreates a Delaunay triangulation.

Returns
TRUE if the triangulation is recreated with no errors or False otherwise

◆ ReGenerateDelaunay()

bool te::mnt::TINGeneration::ReGenerateDelaunay ( int32_t  nt,
int32_t  ntbase,
int32_t  contr 
)
protected

Method that regenerates a Delaunay triangulation.

Parameters
ntis the triangle number
ntbaseis the base triangle number
contris a counter
Returns
TRUE if the triangulation is regenerated with no errors or False otherwise

◆ RegeneratewithNewPoints()

bool te::mnt::TINGeneration::RegeneratewithNewPoints ( std::vector< te::gm::Point > &  p3dl,
std::vector< bool > &  fixed 
)
protected

◆ run()

bool te::mnt::TINGeneration::run ( )

Generate TIN \ return true or false.

◆ SaveTin() [1/2]

bool te::mnt::TINGeneration::SaveTin ( )
protected

◆ SaveTin() [2/2]

bool te::mnt::Tin::SaveTin ( te::da::DataSourcePtr outDsrc,
std::string &  outDsetName 
)
inherited

◆ setBreakLine()

void te::mnt::TINGeneration::setBreakLine ( te::da::DataSourcePtr  inDsrc,
std::string  inDsetName,
std::unique_ptr< te::da::DataSetType inDsetType,
double  tol 
)

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

Parameters
inDsrcThe datasource contains breaklines.
inDsetName
inDsetType
tolbreaklines simplification tolerance in meters.

◆ setEnvelope()

void te::mnt::Tin::setEnvelope ( te::gm::Envelope env)
inherited

Function used to set the envelope parameter

◆ setInput()

void te::mnt::TINGeneration::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

◆ setMaxdist()

void te::mnt::TINGeneration::setMaxdist ( double  maxdist)
inline

Function used to set Triangulation lines simplification maximum distance

Definition at line 96 of file TINGeneration.h.

◆ setMethod()

void te::mnt::TINGeneration::setMethod ( int  method)
inline

Function used to set Triangulation method Delanay or Smaller Angle

Definition at line 102 of file TINGeneration.h.

◆ setMinedgesize()

void te::mnt::TINGeneration::setMinedgesize ( double  minedgesize)
inline

Function used to set Triangulation edges minimum size

Definition at line 99 of file TINGeneration.h.

◆ setOutput()

void te::mnt::TINGeneration::setOutput ( te::da::DataSourcePtr  outDsrc,
std::string  dsname 
)

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

Parameters
inDsrcThe output datasource.
dsname

◆ setParams()

void te::mnt::TINGeneration::setParams ( const double &  tolerance,
const double &  maxdist,
const double &  minedgesize,
const std::string &  atrz_iso,
const std::string &  atrz_pt 
)

It sets the parameters to generate TIN.

Parameters
tolerancelines simplification tolerance in meters.
maxdistlines simplification maximum distance in meters.
minedgesizeedges minimum size in meters.
atrz_isoisolines attribute contains Z value.
atrz_ptsamples attribute contains Z value.

◆ setSRID()

void te::mnt::Tin::setSRID ( int  srid)
inherited

Function used to set the Spatial Reference System ID

◆ setTolerance()

void te::mnt::TINGeneration::setTolerance ( double  tolerance)
inline

Function used to set Triangulation lines simplification tolerance

Definition at line 93 of file TINGeneration.h.

◆ TestAngleBetweenNormals()

bool te::mnt::TINGeneration::TestAngleBetweenNormals ( int32_t  triId,
short  nviz 
)
protected

Method used to test the angle between two normals.

Parameters
triIdis the triangle identification number
nvizis the number of the neighbour triangle
Returns
TRUE if the angle is smaller than old triangles or FALSE otherwise

◆ TestDelaunay() [1/4]

bool te::mnt::TINGeneration::TestDelaunay ( int32_t  tri1Id,
int32_t  tri2Id,
int32_t  tri3Id 
)
protected

Method used to test if the triangulation follows the Delaunay rule.

Parameters
tri1Idis the identification number of the first triangle
tri2Idis the identification number of the second triangle
tri3Idis the identification number of the third triangle
Returns
true if the triangulation is Delaunay or FALSE otherwise

◆ TestDelaunay() [2/4]

bool te::mnt::TINGeneration::TestDelaunay ( int32_t  tri1Id,
int32_t  tri2Id,
int32_t  tri3Id,
int32_t  tri4Id 
)
protected

Method used to test if the triangulation follows the Delaunay rule.

Parameters
tri1Idis the identification number of the first triangle
tri2Idis the identification number of the second triangle
tri3Idis the identification number of the third triangle
tri4Idis the identification number of the fourth triangle
Returns
true if the triangulation is Delaunay or false otherwise

◆ TestDelaunay() [3/4]

bool te::mnt::TINGeneration::TestDelaunay ( int32_t  linId)
protected

Method used to test if the triangulation follows the Delaunay rule.

Parameters
linIdis the identification number of a line
Returns
true if the triangulation is Delaunay or false otherwise

◆ TestDelaunay() [4/4]

bool te::mnt::TINGeneration::TestDelaunay ( int32_t  triId,
short  nviz 
)
protected

Method used to test if the triangulation follows the Delaunay rule.

Parameters
triIdis a triangle identification number
nvizis the number of the neighbor of the triangle triId
Returns
true if the triangulation is Delaunay or false otherwise

◆ TestFlatTriangles()

bool te::mnt::TINGeneration::TestFlatTriangles ( )
protected

Method that test if has flat triangles and regenerate them.

◆ TestIsolines()

bool te::mnt::TINGeneration::TestIsolines ( int  iter)
protected

Method that test the Isolines.

Returns
true if the isolines are modified or false otherwise

◆ TriangleFirstDeriv()

bool te::mnt::Tin::TriangleFirstDeriv ( )
protectedinherited

Method that calculates the first derivatives in the nodes of a given triangle.

Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ TrianglePoints()

bool te::mnt::Tin::TrianglePoints ( int32_t  triangId,
te::gm::Point vertex 
)
protectedinherited

Method that reads the vertex (points) of a given triangle.

Parameters
triangIdis the triangle identification number
vertexis a pointer to a list of Point object, the triangle vertices
Returns
true always

◆ TriangleSecondDeriv()

bool te::mnt::Tin::TriangleSecondDeriv ( )
protectedinherited

Method that calculates the second derivatives in the nodes of a given triangle.

Returns
TRUE if the derivatives are calculate with no errors or FALSE otherwise

◆ TwoNewTriangles()

bool te::mnt::TINGeneration::TwoNewTriangles ( int32_t  t,
int32_t  nodeId,
int32_t *  testLines 
)
protected

Method used to create two new triangles in a TIN (Triangular Irregular Network)

Parameters
tis a triangle identification number
nodeIdis a node identification number
testLinesis a pointer to a vector with number of lines to be tested
Returns
true if the triangles are created with no errors or false otherwise

◆ UpdateTriangles()

bool te::mnt::TINGeneration::UpdateTriangles ( int32_t  t,
int32_t  tv,
int32_t  ai 
)
protected

Method used to Update Triangles of a given triangulation.

Parameters
tis a triangle identification number
tvis a triangle identification number
aiis a side number of a triangle
Returns
true if the triangles are updated or false otherwise

Member Data Documentation

◆ m_atrZ_point

std::string te::mnt::TINGeneration::m_atrZ_point
protected

Definition at line 363 of file TINGeneration.h.

◆ m_atrZ_sample

std::string te::mnt::TINGeneration::m_atrZ_sample
protected

Definition at line 362 of file TINGeneration.h.

◆ m_env

te::gm::Envelope te::mnt::Tin::m_env
protectedinherited

Attribute used to restrict the area to generate the samples.

Definition at line 598 of file Tin.h.

◆ m_fbnode

int32_t te::mnt::Tin::m_fbnode
protectedinherited

First break node number.

Definition at line 617 of file Tin.h.

◆ m_inDsetName_break

std::string te::mnt::TINGeneration::m_inDsetName_break
protected

Definition at line 356 of file TINGeneration.h.

◆ m_inDsetName_point

std::string te::mnt::TINGeneration::m_inDsetName_point
protected

Definition at line 352 of file TINGeneration.h.

◆ m_inDsetName_sample

std::string te::mnt::TINGeneration::m_inDsetName_sample
protected

Definition at line 348 of file TINGeneration.h.

◆ m_inDsetType_break

std::unique_ptr<te::da::DataSetType> te::mnt::TINGeneration::m_inDsetType_break
protected

Definition at line 357 of file TINGeneration.h.

◆ m_inDsetType_point

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

Definition at line 353 of file TINGeneration.h.

◆ m_inDsetType_sample

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

Definition at line 349 of file TINGeneration.h.

◆ m_inDsrc_break

te::da::DataSourcePtr te::mnt::TINGeneration::m_inDsrc_break
protected

Definition at line 355 of file TINGeneration.h.

◆ m_inDsrc_point

te::da::DataSourcePtr te::mnt::TINGeneration::m_inDsrc_point
protected

Definition at line 351 of file TINGeneration.h.

◆ m_inDsrc_sample

te::da::DataSourcePtr te::mnt::TINGeneration::m_inDsrc_sample
protected

Definition at line 347 of file TINGeneration.h.

◆ m_line

std::vector<TinLine> te::mnt::Tin::m_line
protectedinherited

Triangulation lines vector.

Definition at line 604 of file Tin.h.

◆ m_linesize

size_t te::mnt::Tin::m_linesize
protectedinherited

Triangulation lines vector size.

Definition at line 600 of file Tin.h.

◆ m_lline

int32_t te::mnt::Tin::m_lline
protectedinherited

Triangulation last line number.

Definition at line 620 of file Tin.h.

◆ m_lnode

int32_t te::mnt::Tin::m_lnode
protectedinherited

Triangulation last node number.

Definition at line 618 of file Tin.h.

◆ m_ltriang

int32_t te::mnt::Tin::m_ltriang
protectedinherited

Triangulation last triangle number.

Definition at line 619 of file Tin.h.

◆ m_max

double te::mnt::Tin::m_max
protectedinherited

Definition at line 624 of file Tin.h.

◆ m_maxdist

double te::mnt::TINGeneration::m_maxdist
protected

Triangulation lines simplification maximum distance.

Definition at line 369 of file TINGeneration.h.

◆ m_method

int te::mnt::TINGeneration::m_method
protected

Triangulation method Delanay or Smaller Angle.

Definition at line 374 of file TINGeneration.h.

◆ m_min

double te::mnt::Tin::m_min
protectedinherited

Definition at line 623 of file Tin.h.

◆ m_minedgesize

double te::mnt::TINGeneration::m_minedgesize
protected

Triangulation edges minimum size.

Definition at line 370 of file TINGeneration.h.

◆ m_nblfderiv

std::vector<te::gm::Point> te::mnt::Tin::m_nblfderiv
protectedinherited

Definition at line 611 of file Tin.h.

◆ m_nblsderiv

std::vector<TinNode> te::mnt::Tin::m_nblsderiv
protectedinherited

Definition at line 615 of file Tin.h.

◆ m_nbrfderiv

std::vector<te::gm::Point> te::mnt::Tin::m_nbrfderiv
protectedinherited

Definition at line 610 of file Tin.h.

◆ m_nbrsderiv

std::vector<TinNode> te::mnt::Tin::m_nbrsderiv
protectedinherited

Definition at line 614 of file Tin.h.

◆ m_nfderiv

std::vector<te::gm::Point> te::mnt::Tin::m_nfderiv
protectedinherited

Definition at line 609 of file Tin.h.

◆ m_nodatavalue

double te::mnt::Tin::m_nodatavalue
protectedinherited

Definition at line 622 of file Tin.h.

◆ m_node

std::vector<TinNode> te::mnt::Tin::m_node
protectedinherited

Triangulation nodes vector.

Definition at line 606 of file Tin.h.

◆ m_nodesize

size_t te::mnt::Tin::m_nodesize
protectedinherited

Triangulation nodes vector size.

Definition at line 602 of file Tin.h.

◆ m_nsderiv

std::vector<TinNode> te::mnt::Tin::m_nsderiv
protectedinherited

Definition at line 613 of file Tin.h.

◆ m_outDsetName

std::string te::mnt::TINGeneration::m_outDsetName
protected

Definition at line 360 of file TINGeneration.h.

◆ m_outDsrc

te::da::DataSourcePtr te::mnt::TINGeneration::m_outDsrc
protected

Definition at line 359 of file TINGeneration.h.

◆ m_resx

double te::mnt::Tin::m_resx
protectedinherited

Definition at line 627 of file Tin.h.

◆ m_resy

double te::mnt::Tin::m_resy
protectedinherited

Definition at line 627 of file Tin.h.

◆ m_rst

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

Definition at line 626 of file Tin.h.

◆ m_srid

int te::mnt::Tin::m_srid
protectedinherited

Attribute with spatial reference information.

Definition at line 596 of file Tin.h.

◆ m_tfderiv

std::vector<te::gm::Point> te::mnt::Tin::m_tfderiv
protectedinherited

Definition at line 608 of file Tin.h.

◆ m_tolerance

double te::mnt::TINGeneration::m_tolerance
protected

Triangulation lines simplification tolerance.

Definition at line 368 of file TINGeneration.h.

◆ m_tolerance_break

double te::mnt::TINGeneration::m_tolerance_break
protected

Triangulation breaklines simplification tolerance.

Definition at line 372 of file TINGeneration.h.

◆ m_triang

std::vector<TinTriang> te::mnt::Tin::m_triang
protectedinherited

Triangulation triangles vector.

Definition at line 605 of file Tin.h.

◆ m_triangsize

size_t te::mnt::Tin::m_triangsize
protectedinherited

Triangulation triangles vector size.

Definition at line 601 of file Tin.h.

◆ m_tsderiv

std::vector<TinNode> te::mnt::Tin::m_tsderiv
protectedinherited

Definition at line 612 of file Tin.h.


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