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)
 
   87       TinLine(int32_t& nodefrom, int32_t &nodeto, int32_t &leftpoly, int32_t &rightpoly, 
Ltype type) 
 
  109       void Nodes(int32_t nodefrom, int32_t nodeto)
 
  148       bool ExchangeNode(int32_t oldNodeId, int32_t newNodeId);
 
  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 
 
bool ExchangePolygon(int32_t oldPolyId, int32_t newPolyId)
Method for exchange polygons in the triangulation. 
 
int32_t getRightPolygon()
 
bool setEdge(int32_t edge)
 
te::sam::kdtree::Index< KD_NODE > KD_TREE
 
size_t m_triangsize
Triangulation triangles vector size. 
 
void setNodeTo(int32_t nodeid)
 
bool operator==(const TinLine &rhs) const 
 
boost::shared_ptr< DataSource > DataSourcePtr
 
bool operator<(const TinNode &rhs) const 
 
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. 
 
bool ExchangeNode(int32_t oldNodeId, int32_t newNodeId)
Method for exchange nodes in the triangulation. 
 
#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()
 
bool removeEdge(int32_t edge)
 
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)
 
std::vector< TinLine > m_line
Triangulation lines vector. 
 
void setType(Ltype ltype)
 
bool SwapPolygon()
Method for swap two adjacent polygons. 
 
int32_t m_fbnode
First break node number. 
 
bool operator>(const TinLine &rhs) const 
 
bool SwapNode()
Method for swap two nodes. 
 
TinLine(int32_t &nodefrom, int32_t &nodeto, int32_t &leftpoly, int32_t &rightpoly, Ltype type)
 
std::vector< TinTriang > m_triang
Triangulation triangles vector. 
 
bool operator==(const TinNode &rhs) const 
 
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. 
 
bool SwapNodePolygon()
Method for swap two nodes and two adjacent polygons. 
 
std::vector< TinNode > m_nbrsderiv
 
A point with z-coordinate value. 
 
std::vector< TinNode > m_nsderiv
 
const double & getY() const 
It returns the Point y-coordinate value. 
 
const int32_t MAXTRIANGLES
 
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. 
 
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
 
bool operator>(const TinNode &rhs) const 
 
const double & getZ() const 
It returns the Point z-coordinate value. 
 
std::vector< TinNode > m_tsderiv
 
Class to define TIN strutures. 
 
void setX(const double &x)
It sets the Point x-coordinate value. 
 
std::vector< TinNode > m_node
Triangulation nodes vector. 
 
A class that represents an Kd-tree node. 
 
void setRightPolygon(int32_t polyid)
 
std::vector< te::gm::PointZ > m_tfderiv
 
bool LinesId(int32_t *linesId)
 
void setY(const double &y)
It sets the Point y-coordinate value. 
 
void Nodes(int32_t nodefrom, int32_t nodeto)
 
bool operator<(const TinLine &rhs) const 
 
void setZ(const double &z)
It sets the Point z-coordinate value. 
 
int32_t m_nodefrom
initial node number 
 
void setLeftPolygon(int32_t polyid)
 
int32_t m_ltriang
Triangulation last triangle number. 
 
void setType(Ntype ntype)
 
te::sam::kdtree::Node< te::gm::Coord2D, int32_t, int32_t > KD_NODE
 
const double & getX() const 
It returns the Point x-coordinate value. 
 
std::vector< int32_t > m_edge
 
int32_t m_lnode
Triangulation last node number. 
 
std::vector< te::gm::PointZ > m_nfderiv