10 #ifndef __TERRALIB_MNT_INTERNAL_TINGENERATION_H
11 #define __TERRALIB_MNT_INTERNAL_TINGENERATION_H
17 #include "../../dataaccess/dataset/DataSet.h"
18 #include "../../dataaccess/dataset/DataSetType.h"
19 #include "../../dataaccess/datasource/DataSource.h"
21 #include "../../geometry/MultiLineString.h"
22 #include "../../geometry/MultiPoint.h"
23 #include "../../geometry/Point.h"
59 std::string inDsetName,
60 std::unique_ptr<te::da::DataSetType> inDsetType,
88 const double &maxdist,
89 const double &minedgesize,
90 const std::string &atrz_iso,
const std::string &atrz_pt);
96 void setMaxdist(
double maxdist) { m_maxdist = maxdist; };
183 bool TestDelaunay(int32_t tri1Id, int32_t tri2Id, int32_t tri3Id, int32_t tri4Id);
This file contains a class to define a TIN. Adapted from SPRING.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
MultiLineString is a MultiCurve whose elements are LineStrings.
MultiPoint is a GeometryCollection whose elements are restricted to points.
A point with x and y coordinate values.
bool TestFlatTriangles()
Method that test if has flat triangles and regenerate them.
bool IsIsolineSegment(int32_t linid)
Method that veryfies if the Isoline is a segment.
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)
bool TestAngleBetweenNormals(int32_t triId, short nviz)
Method used to test the angle between two normals.
bool CreateDelaunay()
Method that creates a Delaunay triangulation.
bool LoadTin()
Method used to load a triangular network (TIN)
te::da::DataSourcePtr m_inDsrc_sample
bool run()
Generate TIN \ return true or false.
bool RegeneratewithNewPoints(std::vector< te::gm::Point > &p3dl, std::vector< bool > &fixed)
TINGeneration()
Default constructor.
bool IsolinesConstrained()
Method that define the Constrained Isolines.
te::gm::Geometry * 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)
bool InsertNodes(const te::gm::MultiPoint &mpt, const te::gm::MultiLineString &mls)
bool TestDelaunay(int32_t linId)
Method used to test if the triangulation follows the Delaunay rule.
int32_t ExchangePolygon(int32_t triangId, int32_t newPolyId, unsigned short edge)
Method that exchanges polygon.
bool NodeExchange(int32_t oldNode, int32_t newNode)
Method used to exchange two nodes in a TIN (Triangular Irregular Network)
te::da::DataSourcePtr m_inDsrc_break
std::string m_inDsetName_sample
bool IsNeighborOnIsoOrBreakline(int32_t triId, unsigned short nviz)
double m_tolerance_break
Triangulation breaklines simplification tolerance.
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.
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.
bool GenerateDelaunay(int32_t nt, int32_t ntbase, int32_t contr)
Method that generates a Delaunay triangulation.
std::string m_inDsetName_break
bool TestDelaunay(int32_t tri1Id, int32_t tri2Id, int32_t tri3Id)
Method used to test if the triangulation follows the Delaunay rule.
te::da::DataSourcePtr m_inDsrc_point
int m_method
Triangulation method Delanay or Smaller Angle.
te::da::DataSourcePtr m_outDsrc
bool DeleteNode(int32_t node)
Method used to delete a node in a TIN (Triangular Irregular Network)
bool InsertNode(int32_t nodeid, int type)
Method used to insert a node in a TIN (Triangular Irregular Network)
bool TestDelaunay(int32_t triId, short nviz)
Method used to test if the triangulation follows the Delaunay rule.
std::unique_ptr< te::da::DataSetType > m_inDsetType_break
size_t ReadBreakLines(te::gm::MultiPoint &mpt, te::gm::MultiLineString &isolines, std::string &geostype)
bool OnIsolineSegment(int32_t linid, te::gm::Point &pt3d, bool &fixed)
Method that checks if a point 3D is on the isoline segment.
bool CreateInitialTriangles(size_t nsamples)
bool InsertBreakNodes(te::gm::MultiLineString &breaklines)
void setTolerance(double tolerance)
double m_maxdist
Triangulation lines simplification maximum distance.
bool UpdateTriangles(int32_t t, int32_t tv, int32_t ai)
Method used to Update Triangles of a given triangulation.
std::string m_outDsetName
std::string m_atrZ_sample
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.
bool ReGenerateDelaunay(int32_t nt, int32_t ntbase, int32_t contr)
Method that regenerates a Delaunay triangulation.
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.
double m_minedgesize
Triangulation edges minimum size.
void setMinedgesize(double minedgesize)
void setMaxdist(double maxdist)
bool IsBreaklineSegment(int32_t linid)
Method that veryfies if the Breakline is a segment.
bool ReCreateDelaunay()
Method that recreates a Delaunay triangulation.
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.
bool TwoNewTriangles(int32_t t, int32_t nodeId, int32_t *testLines)
Method used to create two new triangles in a TIN (Triangular Irregular Network)
double m_tolerance
Triangulation lines simplification tolerance.
std::string m_inDsetName_point
bool CreateMinAngleTriangulation()
Method used to create a Triangulation using the Minimum Angle Method.
bool TestIsolines(int iter)
Method that test the Isolines.
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
It sets the Datasource that is being used to save TIN.
void setMethod(int method)
bool OrderLines()
Method that order lines.
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)
std::unique_ptr< te::da::DataSetType > m_inDsetType_sample
std::unique_ptr< te::da::DataSetType > m_inDsetType_point
bool ModifyBoundTriangles()
Method that modifies the bounds of Triangles.
Class to define TIN strutures.
boost::shared_ptr< DataSource > DataSourcePtr
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).