Utils.h File Reference

Utility functions for the Geometry Module. More...

#include "Config.h"
#include "Coord2D.h"
#include "Enums.h"
#include "Point.h"
#include <memory>
#include <vector>

Go to the source code of this file.

Classes

struct  te::gm::DistanceOrderFunctor
 This struct is used sorts a vector of points by distance. More...
 
struct  te::gm::TopologyValidationError
 This struct contains informations about GEOS TopologyValidationError. More...
 

Namespaces

 te
 URI C++ Library.
 
 te::gm
 Namespace for the Vector Geometry module of TerraLib.
 

Functions

TEGEOMEXPORT void te::gm::AddLineString (te::gm::LineString *lineString, std::vector< te::gm::Geometry * > &pAdd)
 Add the linestring given to the vector. More...
 
TEGEOMEXPORT void te::gm::AddPolygon (te::gm::Polygon *polygon, std::vector< te::gm::Geometry * > &pAdd)
 Add all line strings from the polygon given to the vector given. More...
 
TEGEOMEXPORT bool te::gm::AdjustSegment (te::gm::Point *P0, te::gm::Point *P1, double d0, te::gm::Coord2D &P0out, te::gm::Coord2D &P1out)
 
TEGEOMEXPORT Envelope te::gm::AdjustToCut (const Envelope &env, double bWidth, double bHeight)
 Finds the correspondent smallest box that allows a box to be cut in blocks of a given size. More...
 
TEGEOMEXPORT bool te::gm::CheckValidity (const te::gm::Geometry *geom, te::gm::TopologyValidationError &error)
 It check geometry validity using GEOS. More...
 
TEGEOMEXPORT void te::gm::ClosestPoints (te::gm::Geometry *geomA, te::gm::Geometry *geomB, te::gm::Coord2D &coordA, te::gm::Coord2D &coordB)
 Compute the the closest points of two geometries. More...
 
TEGEOMEXPORT std::vector< te::gm::Geometry * > te::gm::FixSelfIntersection (const te::gm::Geometry *g)
 It will fix geometries with self-intersection. More...
 
TEGEOMEXPORT double te::gm::GetAngle (te::gm::Coord2D coordA, te::gm::Coord2D coordB)
 
int te::gm::GetCoordDimension (GeomType t)
 It returns the number of measurements or axes needed to describe a position in a coordinate system. More...
 
TEGEOMEXPORT std::auto_ptr< te::gm::Geometryte::gm::GetGeometryUnion (const std::vector< te::gm::Geometry * > &geomVec)
 It returns the union of a geometry vector. More...
 
TEGEOMEXPORT Geometry * te::gm::GetGeomFromEnvelope (const Envelope *const e, int srid)
 It creates a Geometry (a polygon) from the given envelope. More...
 
TEGEOMEXPORT te::gm::Linete::gm::GetIntersectionLine (te::gm::Geometry *geom, te::gm::Coord2D coord)
 
TEGEOMEXPORT std::vector< te::gm::Pointte::gm::GetIntersectionPoints (const te::gm::LineString &lsReference, const std::vector< te::gm::LineString > &candidates)
 
template<class T1 , class T2 >
bool te::gm::Intersects (const T1 &o1, const T2 &o2)
 
template<>
TEGEOMEXPORT bool te::gm::Intersects (const te::gm::Point &point, const te::gm::Envelope &e)
 
TEGEOMEXPORT Coord2D * te::gm::locateAlong (const LineString *line, double initial, double final, double target)
 Make the line interpolation to find a target. More...
 
TEGEOMEXPORT void te::gm::Multi2Single (te::gm::Geometry *g, std::vector< te::gm::Geometry * > &geoms)
 It will get a GeometryCollection and distribute in a vector. More...
 
TEGEOMEXPORT double te::gm::PerpendicularDistance (const te::gm::Point &first, const te::gm::Point &last, te::gm::Point &pin, Point &pinter)
 Calculate the perpendicular distance of a point in a segment. More...
 
TEGEOMEXPORT void te::gm::Polygonizer (te::gm::Geometry *g, std::vector< te::gm::Polygon * > &pols)
 It will get a list of polygons formed by the polygonization. More...
 
TEGEOMEXPORT te::gm::Geometryte::gm::PrepareGeometriesToIntersection (te::gm::Geometry *geom_A, te::gm::Geometry *geom_B)
 
TEGEOMEXPORT te::gm::Polygonte::gm::PrepareGeometriesToIntersection (const te::gm::Polygon &pol_A, const te::gm::Polygon &pol_B)
 
TEGEOMEXPORT te::gm::LineStringte::gm::PrepareGeometriesToIntersection (const te::gm::LineString &ls_A, const te::gm::LineString &ls_B)
 
TEGEOMEXPORT bool te::gm::Rotate (te::gm::Coord2D pr, te::gm::LineString *l, double angle, te::gm::LineString *lOut)
 
TEGEOMEXPORT bool te::gm::SatisfySpatialRelation (const Geometry *g1, const Geometry *g2, SpatialRelation relation)
 It returns if two geometries satisfy a given spatial relation. More...
 
TEGEOMEXPORT te::gm::Geometryte::gm::UnaryUnion (te::gm::Geometry *geom)
 It will get the union of the input geometries. More...
 
TEGEOMEXPORT te::gm::Geometryte::gm::Validate (te::gm::Geometry *geom)
 Get/create a valid version of the geometry given. If the geometry is a polygon or multi polygon, self intersections / inconsistencies are fixed. Otherwise the geometry is returned. More...
 

Detailed Description

Utility functions for the Geometry Module.

Definition in file Utils.h.