Tin.h
Go to the documentation of this file.
1 /*!
2 \file terralib/mnt/core/Tin.h
3 
4 \brief This file contains a class to define a TIN.
5 Adapted from SPRING
6 */
7 
8 #ifndef __TERRALIB_MNT_INTERNAL_TIN_H
9 #define __TERRALIB_MNT_INTERNAL_TIN_H
10 
11 // Terralib Includes
12 #include "Config.h"
13 #include "Enums.h"
14 
15 #include "../../dataaccess/dataset/DataSet.h"
16 #include "../../dataaccess/dataset/DataSetType.h"
17 #include "../../dataaccess/datasource/DataSource.h"
18 
19 #include "../../geometry/Envelope.h"
20 #include "../../geometry/Point.h"
21 
22 #include "../../sam.h"
23 
24 #include <vector>
25 
26 //const int32_t MAXTRIANGLES = 50;
27 const int32_t CLNODES = 10;
28 
31 
32 
33 namespace te
34 {
35  namespace mnt
36  {
37  class TinTriang
38  {
39  public:
41  m_line[0] = -1;
42  m_line[1] = -1;
43  m_line[2] = -1;
44  }
45 
46  /*! Set triangle edges.*/
47  void setEdges(int32_t fLine, int32_t sLine, int32_t tLine)
48  {
49  m_line[0] = fLine;
50  m_line[1] = sLine;
51  m_line[2] = tLine;
52  }
53 
54  //....Fill in vector of triangle lines Ids.
55  bool LinesId(int32_t *linesId)
56  {
57  if (m_line[0] < 0 || m_line[1] < 0 || m_line[2] < 0)
58  return false;
59  linesId[0] = m_line[0];
60  linesId[1] = m_line[1];
61  linesId[2] = m_line[2];
62  return true;
63  }
64 
65  //....Get the line at an edge of the triangle.
66  //....Input:
67  //......edge: edge number (0, 1 or 2).
68  //....Return:
69  //......Line at edge number.
70  int32_t LineAtEdge(unsigned short edge)
71  {
72  if (edge < 3)
73  return m_line[edge];
74  else
75  return -1;
76  }
77  protected:
78  int32_t m_line[3];// line numbers vector
79  };
80 
81 
82  class TinLine
83  {
84  public:
85  TinLine() : m_nodefrom(-1), m_nodeto(-1), m_leftpoly(-1), m_rightpoly(-1), m_type(Normalline) {}
86 
87  TinLine(int32_t& nodefrom, int32_t &nodeto, int32_t &leftpoly, int32_t &rightpoly, Ltype type)
88  : m_nodefrom(nodefrom), m_nodeto(nodeto), m_leftpoly(leftpoly), m_rightpoly(rightpoly), m_type(type) {}
89 
90  bool operator==(const TinLine &rhs) const;
91 
92  bool operator>(const TinLine &rhs) const;
93 
94  bool operator<(const TinLine &rhs) const;
95 
96  /*! Set initial node number.*/
97  void setNodeFrom(int32_t nodeid) { m_nodefrom = nodeid; }
98 
99  /*! Get initial node number.*/
100  int32_t getNodeFrom() { return m_nodefrom; }
101 
102  /*! Set last node number.*/
103  void setNodeTo(int32_t nodeid) { m_nodeto = nodeid; }
104 
105  /*! Get last node number.*/
106  int32_t getNodeTo() { return m_nodeto; }
107 
108  /*! Set initial and last node numbers.*/
109  void Nodes(int32_t nodefrom, int32_t nodeto)
110  {
111  m_nodefrom = nodefrom;
112  m_nodeto = nodeto;
113  }
114 
115  /*! Set left polygon number.*/
116  void setLeftPolygon(int32_t polyid) { m_leftpoly = polyid; }
117 
118  /*! Get left polygon number.*/
119  int32_t getLeftPolygon() { return m_leftpoly; }
120 
121  /*! Set right polygon number.*/
122  void setRightPolygon(int32_t polyid) { m_rightpoly = polyid; }
123 
124  /*! Get right polygon number.*/
125  int32_t getRightPolygon() { return m_rightpoly; }
126 
127  /*! Set left and right polygon numbers*/
128  void Polygons(int32_t leftpoly, int32_t rightpoly)
129  {
130  m_leftpoly = leftpoly;
131  m_rightpoly = rightpoly;
132  }
133 
134  /*!
135  \brief Method for exchange polygons in the triangulation
136  \param oldPolyId is the identification number of the old polygon
137  \param newPolyId is the identification number of the new polygon
138  \return TRUE if the polygons are the polygons are exchanged or FALSE otherwise
139  */
140  bool ExchangePolygon(int32_t oldPolyId, int32_t newPolyId);
141 
142  /*!
143  \brief Method for exchange nodes in the triangulation
144  \param oldNodeId is the identification number of the old node
145  \param newNodeId is the identification number of the new node
146  \return TRUE if the nodes are the polygons are exchanged or FALSE otherwise
147  */
148  bool ExchangeNode(int32_t oldNodeId, int32_t newNodeId);
149 
150  /*! Set line type.*/
151  void setType(Ltype ltype) { m_type = ltype; }
152 
153  /*! Get line type.*/
154  Ltype getType() { return m_type; }
155 
156  /*!
157  \brief Method for swap two nodes
158  \return TRUE always
159  */
160  bool SwapNode();
161 
162  /*!
163  \brief Method for swap two adjacent polygons
164  \return TRUE always
165  */
166  bool SwapPolygon();
167 
168  /*!
169  \brief Method for swap two nodes and two adjacent polygons
170  \return TRUE always
171  */
172  bool SwapNodePolygon();
173 
174  protected:
175  int32_t m_nodefrom; //!< initial node number
176  int32_t m_nodeto; //!< last node number
177  int32_t m_leftpoly; //!< left polygon number
178  int32_t m_rightpoly; //!< right polygon number
179  Ltype m_type; //!< line type
180 
181  };
182 
183 
184  /*!
185  \class TinNode
186  Class that defines a node for triangular irregular network
187  */
188 
189  class TinNode
190  {
191 
192  public:
193  TinNode() : m_type(Deletednode), m_point() {}
194 
195  TinNode(const TinNode &rhs){ m_type = rhs.m_type; m_edge = rhs.m_edge; m_point = rhs.m_point; }
196 
197  bool operator== (const TinNode &rhs) const;
198 
199  bool operator> (const TinNode &rhs) const;
200 
201  bool operator< (const TinNode &rhs) const;
202 
203  bool setEdge(int32_t edge);
204 
205  bool removeEdge(int32_t edge);
206 
207  std::vector<int32_t> &getEdge() { return m_edge; }
208 
209  /*! Set node height value.*/
210  void setZ(double zvalue) { m_point.setZ(zvalue); }
211 
212  /*! Get node height value.*/
213  double getZ() { return m_point.getZ(); }
214 
215  /*! Set node X axis coordinate. */
216  void setX(double xvalue) { m_point.setX(xvalue); }
217 
218  /*! Get node X axis coordinate.*/
219  double getX() { return m_point.getX(); }
220 
221  /*! Set node Y axis coordinate.*/
222  void setY(double yvalue) { m_point.setY(yvalue); }
223 
224  /*! Get node Y axis coordinate.*/
225  double getY() { return m_point.getY(); }
226 
227  /*! Set node coordinates. */
228  void setNPoint(te::gm::Point npoint) { m_point = npoint; }
229 
230  /*! Get node coordinates.*/
231  te::gm::Point& getNPoint() { return m_point; }
232 
233  /*!Set node type. */
234  void setType(Ntype ntype) { m_type = ntype; }
235 
236  /*!Get node type. */
237  Ntype getType() { return m_type; }
238 
239  //!\brief Set node coordinates and height.
240  //!\param npoint: Point with coordinates.
241  //!\param ntype: Type (default value = NORMAL).
242  void Init(te::gm::Point& npoint, Ntype ntype = Normalnode)
243  {
244  m_point = npoint;
245  m_type = ntype;
246  }
247 
248  //!\brief Set node coordinates, height and type.
249  //!\param xvalue: X axis coordinate.
250  //!\param yvalue: Y axis coordinate.
251  //!\param zvalue: Height value.
252  //!\param ntype: Type (default value = NORMAL).
253  void Init(double xvalue, double yvalue, double zvalue, Ntype ntype = Normalnode)
254  {
255  m_point.setX(xvalue);
256  m_point.setY(yvalue);
257  m_point.setZ(zvalue);
258  m_type = ntype;
259  }
260  protected:
261  Ntype m_type; //!< node type
262  te::gm::Point m_point; //!< Node point
263 
264  public:
265  std::vector<int32_t> m_edge;
266  };
267 
268  /*!
269  \class Tin
270 
271  \brief Class to define TIN strutures.
272 
273  \ingroup mnt
274 
275  */
277  {
278  public:
279  Tin() : m_nodatavalue(std::numeric_limits<double>::max()), m_min(std::numeric_limits<double>::max()), m_max(std::numeric_limits<double>::min()) {}
280 
281  ~Tin();
282 
283  /*! Function used to set the Spatial Reference System ID */
284  void setSRID(int srid);
285 
286  /*! Function used to set the envelope parameter */
287  void setEnvelope(te::gm::Envelope &env);
288 
289  /*!
290  \brief Method used to load a triangular network (TIN)
291  \return true if the TIN is loaded with no errors or false otherwise
292  */
293  bool LoadTin(te::da::DataSourcePtr &inDsrc, std::string &inDsetName, double zmin = std::numeric_limits<double>::min(), double zmax = std::numeric_limits<double>::max());
294 
295  /*!
296  \brief Method used to load a triangular network (TIN) generated by QGIS
297  \return true if the TIN is loaded with no errors or false otherwise
298  */
299  bool LoadTinQGIS(te::da::DataSourcePtr &inDsrc, std::string &inDsetName, double zmin, double zmax);
300 
301  bool SaveTin(te::da::DataSourcePtr &outDsrc, std::string &outDsetName);
302 
303  bool BuildTriangle(int32_t id, te::gm::LinearRing* lr, double *val, int32_t *right, int32_t *left, te::mnt::Ntype *type, \
304  double zmin, double zmax, bool &first, KD_TREE &nodetree, te::sam::rtree::Index<std::size_t>& linetree);
305 
306  protected:
307 
308  te::da::DataSetType* GetDataSetType(std::string &outDsetName);
309 
310  /*!
311  \brief Method that finds a triangle containing a given point
312  \param ptr1 is a pointer to a Point object
313  \return true if the triangle was found or false (-1L)otherwise
314  */
315  int32_t FindTriangle(te::gm::Point &ptr1);
316 
317  /*!
318  \brief Method that reads the vertex (points) of a given triangle
319  \param triangId is the triangle identification number
320  \param vertex is a pointer to a list of Point object, the triangle vertices
321  \return true always
322  */
323  bool TrianglePoints(int32_t triangId, te::gm::Point *vertex);
324 
325  bool NeighborsId(int32_t triangId, int32_t *neighsId);
326 
327  /*!
328  \brief Method that reads the identification number of the opposite node of a given edge
329  \param triangId is the triangle identification number
330  \param linId is the line identification number
331  \return the opposite node identification considering the linId
332  */
333  int32_t OppositeNode(int32_t triangId, int32_t linId);
334 
335  /*!
336  \brief Method that reads the identification number of the opposite edge of a given node
337  \param triangId is the triangle identification number
338  \param nodeId is the node identification number
339  \return the opposite edge identification considering the nodeId or -1 if error
340  */
341  int32_t OppositeEdge(int32_t triangId, int32_t nodeId);
342 
343  /*!
344  \brief Method that find the oposite lines of a specific node
345  \param v is the node identification number
346  \param linids is pointer to a list of line identificators
347  \return true if the line is found with no errors or false otherwise
348  */
349  bool NodeOppositeLines(int32_t v, std::vector<int32_t> &linids);
350 
351  /*!
352  \brief Method that finds out which is the previous node
353  \param nodeId is the node identification number
354  \return the number of the previous node
355  */
356  int32_t PreviousNode(int32_t nodeId);
357 
358  /*!
359  \brief Method that finds out which is the next node
360  \param nodeId is the node identification number
361  \return the number of the next node
362  */
363  int32_t NextNode(int32_t nodeId);
364 
365  /*!
366  \brief Method that verifies if a triangle contains a given point
367  \param triangId is the triangle identification number
368  \param pt is a pointer to a te::gm::PointZ object
369  \return TRUE if the point is in the triangle or FALSE (-1L)otherwise
370  */
371  bool ContainsPoint(int32_t triangId, te::gm::Point &pt);
372 
373  /*!
374  \brief Method that find a line containing a specific node
375  \param nid is the node identification number
376  \return the number of the line if it was found with no errors or FALSE (-1L) otherwise
377  */
378  std::vector<int32_t> FindLine(int32_t nid);
379 
380  /*!
381  \brief Method that find a line given two nodes identification
382  \param fnid is the first node identification number
383  \param snid is the second node identification number
384  \return the number of the line if it was found with no errors or FALSE (-1L) otherwise
385  */
386  int32_t FindLine(int32_t fnid, int32_t snid);
387 
388  /*!
389  \brief Method that includes a node in the tin line list
390  \param v is the node identificator number
391  \param linids is a pointer to a list of line identificators
392  \return TRUE if the node is included with no errors or FALSE otherwise
393  */
394  bool NodeLines(int32_t v, std::vector<int32_t> &linids);
395 
396  /*!
397  \brief Method that reads the identification number of the nodes of a given triangle
398  \param triangId is the triangle identification number
399  \param vertex is the number of the vertex to be considered
400  \return the node identification related to the vertex
401  */
402  int32_t NodeId(int32_t triangId, short vertex);
403 
404  /*!
405  \brief Method that reads the identification number of the nodes of a given triangle
406  \param triangId is the triangle identification number
407  \param nodesIds is a pointer to a list of node identification numbers
408  \return TRUE always
409  */
410  bool NodesId(int32_t triangId, int32_t *nodeIds);
411 
412 
413  /*!
414  \brief Method that includes a node in the tin node list
415  \param v is the node identification number
416  \param nodids is a pointer to a list of node identificators
417  \return TRUE if the node is included with no errors or FALSE otherwise
418  */
419  bool NodeNodes(int32_t v, std::vector<int32_t>& nodids);
420 
421  /*!
422  \brief Method that search a node in a triangulation
423  \param v is the node identification number
424  \return the right or left polygon of a line containing v or FALSE (-1L) otherwise
425  */
426  int32_t NodeTriangle(int32_t v);
427 
428  /*!
429  \brief Method that includes a node in a triangle list
430  \param v is the node identification number
431  \param triangles is pointer to a vetor of triangles
432  \return TRUE if the node is included with no errors or FALSE otherwise
433  */
434  bool NodeTriangles(int32_t v, std::vector<int32_t>& triangles);
435 
436  /*!
437  \brief Method that reallocates Vectors
438  \param nSize is the vector size
439  \return true always
440  */
441  bool ReallocateVectors(size_t nSize);
442 
443  /*!
444  \brief Method that calculates the first and second derivatives in the nodes of a given triangle
445  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
446  */
447  bool NodeDerivatives();
448 
449  /*!
450  \brief Method that calculates the first derivatives in the nodes of a given triangle
451  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
452  */
453  bool TriangleFirstDeriv();
454 
455  /*!
456  \brief Method that calculates the second derivatives in the nodes of a given triangle
457  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
458  */
459  bool TriangleSecondDeriv();
460 
461  /*!
462  \brief Method that calculates the first derivatives in the nodes of a given triangle
463  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
464  */
465  bool NodeFirstDeriv();
466 
467  /*!
468  \brief Method that calculates the second derivative at all triangulation nodes
469  \return TRUE if the derivatives are calculated with no errors or False otherwise
470  */
471  bool NodeSecondDeriv();
472 
473  /*!
474  \brief Method that find the triangle list sharing a given node
475  \param nodeid is the node identification number
476  \param rightri is a pointer to the triangles at right side
477  \param lefttri is a pointer to the triangles at left side
478  \return TRUE if the lists are find with no errors or FALSE otherwise
479  */
480  bool NodeTriangles(int32_t nodeid, std::vector<int32_t> &rightri, std::vector<int32_t> &leftri);
481 
482  /*!
483  \brief Method that searches the closest points of a specific node
484  \param nid is the node identification number
485  \param clstNids is a pointer to a list of closest node identificators
486  \param useBrNode is the break nodeidentification
487  \return TRUE if the points are found with no errors or FALSE otherwise
488  */
489  bool NodeClosestPoints(int32_t nid, int32_t *clstNids, bool useBrNode = true);
490 
491  /*!
492  \brief Method that calculates the first derivative in a given node
493  \param nodeid is the node identification number
494  \param clstNodes is the vector of a list of nodes)
495  \return a Point object containing the first derivative in x and y directions
496  */
497  te::gm::Point CalcNodeFirstDeriv(int32_t nodeId, int32_t clstNodes[CLNODES]);
498 
499  /*!
500  \brief Method that calculates the second derivative in a given node
501  \param nodeid is the node identification number
502  \param clstNIds is the vector of a list of nodes identification
503  \return a Point object containing the first derivative in x and y directions
504  */
505  TinNode CalcNodeSecondDeriv(int32_t nodeId, int32_t clstNIds[CLNODES]);
506 
507  /*!
508  \brief Method that calculates the first derivatives in the nodes of a given break triangle
509  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
510  */
511  bool BreakNodeFirstDeriv();
512 
513  /*!
514  \brief Method that calculates the second derivatives in the nodes of a given break triangle
515  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
516  */
517  bool BreakTriangleSecondDeriv();
518 
519  /*!
520  \brief Method that searches the Break node closest points
521  \param nid is the node identification number
522  \param rClstNids is a pointer to a list of right node identificators
523  \param lClstNids is a pointer to a list of left node identificators
524  \return TRUE if the points are found with no errors or FALSE otherwise
525  */
526  bool BreakNodeClosestPoints(int32_t nid, int32_t *rClstNids, int32_t *lClstNids);
527 
528  /*!
529  \brief Method that calculates the second derivatives in a node of a given triangle
530  \param triangles is a pointer to a list of triangle identificators (SIDList object)
531  \param fderiv is a pointer to a Point object representing the first derivative in x and y directions
532  \return TRUE if the derivatives are calculate with no errors or FALSE otherwise
533  */
534  bool CalcTriangleSecondDeriv(std::vector<int32_t> &triangles, std::vector<te::gm::Point> &fderiv);
535 
536  /*!
537  \brief Method that calculates the second derivative at all triangulation break nodes
538  \return TRUE if the derivatives are calculated with no errors or False otherwise
539  */
540  bool BreakNodeSecondDeriv();
541 
542  /*!
543  \brief Method that check the topology in a triangulation
544  \return TRUE if the topology was checked with no errors or FALSE otherwise
545  */
546  bool CheckTopology();
547 
548  /*!
549  \brief Method that check the lines in a triangulation
550  \return TRUE if the lines was checked with no errors or FALSE otherwise
551  */
552  bool CheckLines(int32_t trid);
553 
554  /*!
555  \brief Method that evaluates Z values for pt1 and pt2 using the Akima polynomium fitted in a triangle
556  \param triid is the triangle identificator number
557  \param pt1 is a pointer to a Point3d object
558  \param pt2 is a pointer to a Point3d object
559  \return TRUE always
560  */
561  bool CalcZvalueAkima(int32_t triid, te::gm::Point &pt1, te::gm::Point &pt2);
562 
563  /*!
564  \brief Method that defines the coefficients of the Akima polynomium fitted in a given triangle
565  \param triid is the triangle identification number
566  \param coef is a pointer to a double vector containing the polynomium coefficients
567  \return TRUE if the coefficients are determined with no errors or FALSE otherwise
568  */
569  bool DefineAkimaCoeficients(int32_t triid, double *coef);
570 
571  /*!
572  \brief Method that defines the coefficients of the Akima polynomium fitted in a given triangle
573  \param triid is the triangle identification number
574  \param nodesid is the list of triangle nodes identification
575  \param p3d is a pointer to a Point3d object
576  \param coef is a pointer to a double vector containing the polynomium coefficients
577  \return TRUE if the coefficients are determined with no errors or FALSE otherwise
578  */
579  bool DefineAkimaCoeficients(int32_t triid, int32_t *nodesid, te::gm::Point *p3d, double *coef);
580 
581  bool FillGridValue(int32_t triid, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol, double zvalue);
582 
583  /*!
584  \brief Method that calculates the lines and the columns intercepted by a triangle
585  \param grid is a pointer to a grid object that will be created
586  \param nodesid is a vector with nodes identification of the current triangle
587  \param flin and llin are the first and the last lines (rows) of the grid
588  \param fcol and lcol are the first and the last columns of the grid
589  \return TRUE if the gradient grid is filled or FALSE otherwise
590  */
591  bool DefineInterLinesColumns(int32_t *nodesid, int32_t &flin, int32_t &llin, int32_t &fcol, int32_t &lcol);
592 
593  int m_srid; //!< Attribute with spatial reference information
594 
595  te::gm::Envelope m_env; //!< Attribute used to restrict the area to generate the samples.
596 
597  size_t m_linesize; //!< Triangulation lines vector size.
598  size_t m_triangsize; //!< Triangulation triangles vector size.
599  size_t m_nodesize; //!< Triangulation nodes vector size.
600 
601  std::vector<TinLine> m_line; //!< Triangulation lines vector.
602  std::vector<TinTriang> m_triang; //!< Triangulation triangles vector.
603  std::vector<TinNode> m_node; //!< Triangulation nodes vector.
604 
605  std::vector<te::gm::Point> m_tfderiv; //Pointer to triangles first derivatives vector.
606  std::vector<te::gm::Point> m_nfderiv; //Pointer to nodes first derivatives vector.
607  std::vector<te::gm::Point> m_nbrfderiv; //Pointer to right side nodes first derivatives vector.
608  std::vector<te::gm::Point> m_nblfderiv; //Pointer to left side nodes first derivatives vector.
609  std::vector<TinNode> m_tsderiv; //Pointer to triangles second derivatives vector.
610  std::vector<TinNode> m_nsderiv; //Pointer to nodes second derivatives vector.
611  std::vector<TinNode> m_nbrsderiv; //Pointer to right side nodes second derivatives vector.
612  std::vector<TinNode> m_nblsderiv; //Pointer to left side nodes second derivatives vector.
613 
614  int32_t m_fbnode; //!<First break node number.
615  int32_t m_lnode; //!<Triangulation last node number.
616  int32_t m_ltriang; //!<Triangulation last triangle number.
617  int32_t m_lline; //!<Triangulation last line number.
618 
620  double m_min;
621  double m_max;
622 
624  double m_resx, m_resy;
625 
626  };
627 
628  } // end namespace mnt
629 } // end namespace te
630 
631 #endif
int m_srid
Attribute with spatial reference information.
Definition: Tin.h:593
void Polygons(int32_t leftpoly, int32_t rightpoly)
Definition: Tin.h:128
int32_t m_nodeto
last node number
Definition: Tin.h:176
int32_t getRightPolygon()
Definition: Tin.h:125
TEDATAACCESSEXPORT te::da::Expression * operator<(const te::da::Expression &e1, const te::da::Expression &e2)
te::sam::kdtree::Index< KD_NODE > KD_TREE
Definition: Tin.h:30
size_t m_triangsize
Triangulation triangles vector size.
Definition: Tin.h:598
void setNodeTo(int32_t nodeid)
Definition: Tin.h:103
int32_t m_line[3]
Definition: Tin.h:78
int32_t getNodeFrom()
Definition: Tin.h:100
void setNPoint(te::gm::Point npoint)
Definition: Tin.h:228
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1440
A class that represents an R-tree.
Definition: Index.h:56
double getX()
Definition: Tin.h:219
A class that models the description of a dataset.
Definition: DataSetType.h:72
te::gm::Envelope m_env
Attribute used to restrict the area to generate the samples.
Definition: Tin.h:595
Ltype m_type
line type
Definition: Tin.h:179
size_t m_nodesize
Triangulation nodes vector size.
Definition: Tin.h:599
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
int32_t m_lline
Triangulation last line number.
Definition: Tin.h:617
void setEdges(int32_t fLine, int32_t sLine, int32_t tLine)
Definition: Tin.h:47
std::vector< int32_t > & getEdge()
Definition: Tin.h:207
void setZ(double zvalue)
Definition: Tin.h:210
double m_max
Definition: Tin.h:621
void Init(double xvalue, double yvalue, double zvalue, Ntype ntype=Normalnode)
Set node coordinates, height and type.
Definition: Tin.h:253
TinNode(const TinNode &rhs)
Definition: Tin.h:195
void setNodeFrom(int32_t nodeid)
Definition: Tin.h:97
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
std::vector< TinLine > m_line
Triangulation lines vector.
Definition: Tin.h:601
void setType(Ltype ltype)
Definition: Tin.h:151
int32_t m_fbnode
First break node number.
Definition: Tin.h:614
TinLine(int32_t &nodefrom, int32_t &nodeto, int32_t &leftpoly, int32_t &rightpoly, Ltype type)
Definition: Tin.h:87
std::vector< TinTriang > m_triang
Triangulation triangles vector.
Definition: Tin.h:602
int32_t LineAtEdge(unsigned short edge)
Definition: Tin.h:70
size_t m_linesize
Triangulation lines vector size.
Definition: Tin.h:597
double m_nodatavalue
Definition: Tin.h:619
double m_min
Definition: Tin.h:620
A LinearRing is a LineString that is both closed and simple.
Definition: LinearRing.h:53
std::vector< TinNode > m_nbrsderiv
Definition: Tin.h:611
Ntype
Definition: Enums.h:31
int32_t getNodeTo()
Definition: Tin.h:106
std::vector< TinNode > m_nsderiv
Definition: Tin.h:610
A point with x and y coordinate values.
Definition: Point.h:50
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
An abstract class for raster data strucutures.
Definition: Raster.h:71
void Init(te::gm::Point &npoint, Ntype ntype=Normalnode)
Set node coordinates and height.
Definition: Tin.h:242
int32_t m_leftpoly
left polygon number
Definition: Tin.h:177
URI C++ Library.
int32_t m_rightpoly
right polygon number
Definition: Tin.h:178
int32_t getLeftPolygon()
Definition: Tin.h:119
std::vector< te::gm::Point > m_nblfderiv
Definition: Tin.h:608
const int32_t CLNODES
Definition: Tin.h:27
std::vector< te::gm::Point > m_nfderiv
Definition: Tin.h:606
TEDATAACCESSEXPORT te::da::Expression * operator>(const te::da::Expression &e1, const te::da::Expression &e2)
A class that represents a two dimensional K-d Tree (2-d Tree).
Definition: Index.h:68
double m_resy
Definition: Tin.h:624
Ntype getType()
Definition: Tin.h:237
Ltype
Definition: Enums.h:20
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
te::rst::Raster * m_rst
Definition: Tin.h:623
std::vector< TinNode > m_nblsderiv
Definition: Tin.h:612
void setX(double xvalue)
Definition: Tin.h:216
std::vector< TinNode > m_tsderiv
Definition: Tin.h:609
Class to define TIN strutures.
Definition: Tin.h:276
double getY()
Definition: Tin.h:225
std::vector< TinNode > m_node
Triangulation nodes vector.
Definition: Tin.h:603
A class that represents an Kd-tree node.
Definition: Node.h:61
std::vector< te::gm::Point > m_nbrfderiv
Definition: Tin.h:607
void setY(double yvalue)
Definition: Tin.h:222
void setRightPolygon(int32_t polyid)
Definition: Tin.h:122
std::vector< te::gm::Point > m_tfderiv
Definition: Tin.h:605
bool LinesId(int32_t *linesId)
Definition: Tin.h:55
Ltype getType()
Definition: Tin.h:154
te::gm::Point m_point
Node point.
Definition: Tin.h:262
void Nodes(int32_t nodefrom, int32_t nodeto)
Definition: Tin.h:109
int32_t m_nodefrom
initial node number
Definition: Tin.h:175
void setLeftPolygon(int32_t polyid)
Definition: Tin.h:116
int32_t m_ltriang
Triangulation last triangle number.
Definition: Tin.h:616
double getZ()
Definition: Tin.h:213
void setType(Ntype ntype)
Definition: Tin.h:234
te::gm::Point & getNPoint()
Definition: Tin.h:231
te::sam::kdtree::Node< te::gm::Coord2D, int32_t, int32_t > KD_NODE
Definition: Tin.h:29
Ntype m_type
node type
Definition: Tin.h:261
std::vector< int32_t > m_edge
Definition: Tin.h:265
int32_t m_lnode
Triangulation last node number.
Definition: Tin.h:615
General enumerations.