8 #ifndef __TERRALIB_MNT_INTERNAL_UTILS_H
9 #define __TERRALIB_MNT_INTERNAL_UTILS_H
14 #include "../../common/UnitsOfMeasureManager.h"
16 #include "../../dataaccess/dataset/DataSet.h"
17 #include "../../dataaccess/dataset/DataSetType.h"
18 #include "../../dataaccess/datasource/DataSource.h"
20 #include "../../geometry/Coord2D.h"
21 #include "../../geometry/LineString.h"
22 #include "../../geometry/MultiLineString.h"
23 #include "../../geometry/MultiPoint.h"
24 #include "../../geometry/PointZ.h"
28 #define MIN(x, y) ( ((x) < (y)) ? (x) : (y) )
32 #define MAX(x, y) ( ((x) > (y)) ? (x) : (y) )
74 bool extractLines(std::vector<te::gm::PointZ> &pline, std::vector<te::gm::LineString> &clinlist,
double scale);
76 bool initLineVector(std::vector<te::gm::PointZ> &pline, std::vector<te::gm::PointZ> &vect);
77 bool assembLine(std::vector<te::gm::LineString> &linlout, std::vector<te::gm::PointZ> &vect);
93 bool point3dListFilter(std::vector<te::gm::PointZ> &p3dl, std::vector<bool> &fixed,
double tol);
99 bool SaveIso(std::string& outDsetName,
te::da::DataSourcePtr &outDsrc, std::vector<te::gm::LineString> &isolist, std::vector<double> &guidevalues,
int srid);
bool Least_square_fitting(double *vectx, double *vecty, short np, short deg, double *coef)
bool Equal(te::gm::PointZ &p1, te::gm::PointZ &p2, double &tol)
size_t ReadSamples(std::string &inDsetName, te::da::DataSourcePtr &inDsrc, std::string &atrZ, double tol, double max, Simplify alg, te::gm::MultiPoint &mpt, te::gm::MultiLineString &isolines, std::string &geostype, te::gm::Envelope &env)
boost::shared_ptr< DataSource > DataSourcePtr
A class that models the description of a dataset.
bool normalizeVector(double *)
double Distance(const te::gm::Coord2D &pt1, const te::gm::Coord2D &pt2)
bool testVertexValues(double, te::gm::PointZ *)
bool extractLines(std::vector< te::gm::PointZ > &pline, std::vector< te::gm::LineString > &clinlist, double scale)
te::gm::Point Max(te::gm::Point &p1, te::gm::Point &p2)
bool Gauss_elimination(short m, short n, double mat[6][6])
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
An utility struct for representing 2D coordinates.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
TEMNTEXPORT bool convertAngleToPlanar(double &val, te::common::UnitOfMeasurePtr planar, int type)
bool segInterPoint(te::gm::PointZ &pfr, te::gm::PointZ &pto, te::gm::PointZ &lfr, te::gm::PointZ <o, te::gm::PointZ *pt)
short findCenter(te::gm::PointZ *vert, double *pcx, double *pcy)
bool point3dListFilter(std::vector< te::gm::PointZ > &p3dl, std::vector< bool > &fixed, double tol)
size_t ReadPoints(std::string &inDsetName, te::da::DataSourcePtr &inDsrc, std::string &atrZ, double tol, te::gm::MultiPoint &mpt, std::string &geostype, te::gm::Envelope &env)
TEMNTEXPORT bool convertPlanarToAngle(double &val, te::common::UnitOfMeasurePtr unit)
bool SaveIso(std::string &outDsetName, te::da::DataSourcePtr &outDsrc, std::vector< te::gm::LineString > &isolist, std::vector< double > &guidevalues, int srid)
MultiPoint is a GeometryCollection whose elements are restricted to points.
A point with z-coordinate value.
bool triangleNormalVector(te::gm::PointZ *, double *)
LineString is a curve with linear interpolation between points.
A point with x and y coordinate values.
An Envelope defines a 2D rectangular region.
TEMNTEXPORT void getMinMax(te::rst::Raster *inputRst, double &vmin, double &vmax)
An abstract class for raster data strucutures.
bool equalFptSpt(te::gm::PointZ &fpt, te::gm::PointZ &spt, double scale)
void Save(te::da::DataSource *source, te::da::DataSet *result, te::da::DataSetType *outDsType)
MultiLineString is a MultiCurve whose elements are LineStrings.
bool onSegment(te::gm::PointZ &pt, te::gm::PointZ &fseg, te::gm::PointZ &lseg, double tol)
A dataset is the unit of information manipulated by the data access module of TerraLib.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
bool assembLine(std::vector< te::gm::LineString > &linlout, std::vector< te::gm::PointZ > &vect)
int onSameSide(te::gm::Coord2D pt1, te::gm::Coord2D pt2, te::gm::Coord2D fseg, te::gm::Coord2D lseg)
bool initLineVector(std::vector< te::gm::PointZ > &pline, std::vector< te::gm::PointZ > &vect)
bool defineInterEdge(std::vector< te::gm::PointZ > &, te::gm::PointZ &, te::gm::PointZ &, double)
te::gm::Point Min(te::gm::Point &p1, te::gm::Point &p2)
short segIntersect(te::gm::PointZ &pfr, te::gm::PointZ &pto, te::gm::PointZ &lfr, te::gm::PointZ <o)
double pointToSegmentDistance(te::gm::PointZ &fseg, te::gm::PointZ &lseg, te::gm::PointZ &pt, te::gm::PointZ *pti)
bool defineInterTriangle(std::vector< te::gm::PointZ > &, te::gm::PointZ *, double)
te::gm::LineString * GEOS_DouglasPeucker(te::gm::LineString *ls, double snap, double Zvalue)
TEMNTEXPORT te::gm::LineString * pointListSimplify(te::gm::LineString *ls, double snap, double maxdist, double Zvalue)
te::gm::LineString * DouglasPeuckerTA(te::gm::LineString *lineIn, double simpFactor, double Zvalue)