8 #ifndef __TERRALIB_MNT_INTERNAL_TIN_H     9 #define __TERRALIB_MNT_INTERNAL_TIN_H    15 #include "../../dataaccess/dataset/DataSet.h"    16 #include "../../dataaccess/dataset/DataSetType.h"    17 #include "../../dataaccess/datasource/DataSource.h"    19 #include "../../geometry/Envelope.h"    20 #include "../../geometry/PointZ.h"    22 #include "../../sam.h"    47       void setEdges(int32_t fLine, int32_t sLine, int32_t tLine)
    85       TinLine() : m_nodefrom(-1), m_nodeto(-1), m_leftpoly(-1), m_rightpoly(-1), m_type(
Normalline) {}
    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) {}
   109       void Nodes(int32_t nodefrom, int32_t nodeto)
   111         m_nodefrom = nodefrom;
   130         m_leftpoly = leftpoly;
   131         m_rightpoly = rightpoly;
   140       bool ExchangePolygon(int32_t oldPolyId, int32_t newPolyId);
   148       bool ExchangeNode(int32_t oldNodeId, int32_t newNodeId);
   172       bool SwapNodePolygon();
   203       bool setEdge(int32_t edge);
   205       bool removeEdge(int32_t edge);
   207       std::vector<int32_t> &
getEdge() { 
return m_edge; }
   210       void setZ(
double zvalue) { m_point.setZ(zvalue); }
   213       double getZ() { 
return m_point.getZ(); }
   216       void setX(
double xvalue) { m_point.setX(xvalue); }
   219       double getX() { 
return m_point.getX(); }
   222       void setY(
double yvalue) { m_point.setY(yvalue); }
   225       double getY() { 
return  m_point.getY(); }
   255         m_point.setX(xvalue);
   256         m_point.setY(yvalue);
   257         m_point.setZ(zvalue);
   279       Tin() : m_nodatavalue(std::numeric_limits<double>::max()), m_min(std::numeric_limits<double>::max()), m_max(std::numeric_limits<double>::min()) {}
   282       void setSRID(
int srid);
   291       bool LoadTin(
te::da::DataSourcePtr &inDsrc, std::string &inDsetName, 
double zmin = std::numeric_limits<double>::min(), 
double zmax = std::numeric_limits<double>::max());
   323       bool NeighborsId(int32_t triangId, int32_t *neighsId);
   331       int32_t OppositeNode(int32_t triangId, int32_t linId);
   339       int32_t OppositeEdge(int32_t triangId, int32_t nodeId);
   347       bool NodeOppositeLines(int32_t v, std::vector<int32_t> &linids);
   354       int32_t PreviousNode(int32_t nodeId);
   361       int32_t NextNode(int32_t nodeId);
   376       std::vector<int32_t> FindLine(int32_t nid);
   384       int32_t FindLine(int32_t fnid, int32_t snid);
   392       bool NodeLines(int32_t v, std::vector<int32_t> &linids);
   400       int32_t NodeId(int32_t triangId, 
short vertex);
   408       bool NodesId(int32_t triangId, int32_t *nodeIds);
   417       bool NodeNodes(int32_t v, std::vector<int32_t>& nodids);
   424      int32_t NodeTriangle(int32_t v);
   432       bool NodeTriangles(int32_t v, std::vector<int32_t>& triangles);
   439       bool ReallocateVectors(
size_t nSize);
   445       bool NodeDerivatives();
   451       bool TriangleFirstDeriv();
   457       bool TriangleSecondDeriv();
   463       bool NodeFirstDeriv();
   469       bool NodeSecondDeriv();
   478       bool NodeTriangles(int32_t nodeid, std::vector<int32_t> &rightri, std::vector<int32_t> &leftri);
   487       bool NodeClosestPoints(int32_t nid, int32_t *clstNids, 
bool useBrNode = 
true);
   503       TinNode CalcNodeSecondDeriv(int32_t nodeId, int32_t clstNIds[CLNODES]);
   509       bool BreakNodeFirstDeriv();
   515       bool BreakTriangleSecondDeriv();
   524       bool BreakNodeClosestPoints(int32_t nid, int32_t *rClstNids, int32_t *lClstNids);
   532       bool CalcTriangleSecondDeriv(std::vector<int32_t> &triangles, std::vector<te::gm::PointZ> &fderiv);
   538       bool BreakNodeSecondDeriv();
   544       bool CheckTopology();
   550       bool CheckLines(int32_t trid);
   567       bool DefineAkimaCoeficients(int32_t triid, 
double *coef);
   577       bool DefineAkimaCoeficients(int32_t triid, int32_t *nodesid, 
te::gm::PointZ *p3d, 
double *coef);
   579       bool FillGridValue(int32_t triid, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol, 
double zvalue);
   589       bool DefineInterLinesColumns(int32_t *nodesid, int32_t &flin, int32_t &llin, int32_t &fcol, int32_t &lcol);
 int m_srid
Attribute with spatial reference information. 
 
void Polygons(int32_t leftpoly, int32_t rightpoly)
 
te::gm::PointZ m_point
Node point. 
 
void setNPoint(te::gm::PointZ npoint)
 
int32_t m_nodeto
last node number 
 
int32_t getRightPolygon()
 
TEDATAACCESSEXPORT te::da::Expression * operator<(const te::da::Expression &e1, const te::da::Expression &e2)
 
size_t m_triangsize
Triangulation triangles vector size. 
 
void setNodeTo(int32_t nodeid)
 
const int32_t MAXTRIANGLES
 
boost::shared_ptr< DataSource > DataSourcePtr
 
A class that represents an R-tree. 
 
std::vector< te::gm::PointZ > m_nblfderiv
 
A class that models the description of a dataset. 
 
te::gm::Envelope m_env
Attribute used to restrict the area to generate the samples. 
 
size_t m_nodesize
Triangulation nodes vector size. 
 
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
int32_t m_lline
Triangulation last line number. 
 
void setEdges(int32_t fLine, int32_t sLine, int32_t tLine)
 
std::vector< int32_t > & getEdge()
 
void Init(double xvalue, double yvalue, double zvalue, Ntype ntype=Normalnode)
Set node coordinates, height and type. 
 
TinNode(const TinNode &rhs)
 
void setNodeFrom(int32_t nodeid)
 
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
 
std::vector< TinLine > m_line
Triangulation lines vector. 
 
void setType(Ltype ltype)
 
int32_t m_fbnode
First break node number. 
 
TinLine(int32_t &nodefrom, int32_t &nodeto, int32_t &leftpoly, int32_t &rightpoly, Ltype type)
 
std::vector< TinTriang > m_triang
Triangulation triangles vector. 
 
te::gm::PointZ & getNPoint()
 
int32_t LineAtEdge(unsigned short edge)
 
size_t m_linesize
Triangulation lines vector size. 
 
std::vector< te::gm::PointZ > m_nbrfderiv
 
A LinearRing is a LineString that is both closed and simple. 
 
std::vector< TinNode > m_nbrsderiv
 
A point with z-coordinate value. 
 
std::vector< TinNode > m_nsderiv
 
An Envelope defines a 2D rectangular region. 
 
An abstract class for raster data strucutures. 
 
int32_t m_leftpoly
left polygon number 
 
int32_t m_rightpoly
right polygon number 
 
void Init(te::gm::PointZ &npoint, Ntype ntype=Normalnode)
Set node coordinates and height. 
 
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). 
 
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
 
std::vector< TinNode > m_nblsderiv
 
std::vector< TinNode > m_tsderiv
 
Class to define TIN strutures. 
 
std::vector< TinNode > m_node
Triangulation nodes vector. 
 
A class that represents an Kd-tree node. 
 
te::sam::kdtree::Index< KD_NODE > KD_TREE
 
te::sam::kdtree::Node< te::gm::Coord2D, int32_t, int32_t > KD_NODE
 
void setRightPolygon(int32_t polyid)
 
std::vector< te::gm::PointZ > m_tfderiv
 
bool LinesId(int32_t *linesId)
 
void Nodes(int32_t nodefrom, int32_t nodeto)
 
int32_t m_nodefrom
initial node number 
 
void setLeftPolygon(int32_t polyid)
 
int32_t m_ltriang
Triangulation last triangle number. 
 
void setType(Ntype ntype)
 
std::vector< int32_t > m_edge
 
int32_t m_lnode
Triangulation last node number. 
 
std::vector< te::gm::PointZ > m_nfderiv