Utility functions for the Geometry Module. More...
#include "../sam/rtree.h"
#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 te::gm::LinearRing * | te::gm::AddIntersectionPoints (const te::sam::rtree::Index< std::size_t, 8 > &rtree, const std::vector< te::gm::LineString > &candidateSegments, const te::gm::LinearRing &lr_Reference, const bool &usePerpendicularDistance=false) |
Add intersection points in a LinearRing based on a Vector of LineString as reference. More... | |
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 te::gm::Geometry * | te::gm::CascadedPolygonUnion (const std::vector< te::gm::Polygon * > &polygonVector) |
Provides an efficient method of unioning a collection of Polygonal geometries. This algorithm is faster and likely more robust than the simple iterated approach of repeatedly unioning each polygon to a result geometry. 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::unique_ptr< te::gm::Geometry > | te::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::Line * | te::gm::GetIntersectionLine (te::gm::Geometry *geom, te::gm::Coord2D coord) |
TEGEOMEXPORT std::vector< te::gm::Point > | te::gm::GetIntersectionPointsByOperators (const te::gm::LineString &lsReference, const std::vector< te::gm::LineString > &candidates) |
Gets a vector of LineString reference points including intersection points using GEOS operators. More... | |
TEGEOMEXPORT std::vector< te::gm::Point > | te::gm::GetIntersectionPointsByPerpendicularDistance (const te::gm::LineString &lsReference, const std::vector< te::gm::LineString > &candidates) |
Gets a vector of LineString reference points including intersection points using perpendicular distance. More... | |
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 (const 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::Geometry * | te::gm::PrepareGeometriesToIntersection (te::gm::Geometry *geom_A, te::gm::Geometry *geom_B) |
Prepares the geometry A with intersection points in geometry B. More... | |
TEGEOMEXPORT te::gm::Geometry * | te::gm::PrepareGeometriesToIntersection (const te::gm::MultiPolygon &mpol_A, const te::gm::MultiPolygon &mpol_B) |
Prepares the Polygon A with intersection points in Polygon B. More... | |
TEGEOMEXPORT te::gm::Geometry * | te::gm::PrepareGeometriesToIntersection (const te::gm::Polygon &pol_A, const te::gm::Polygon &pol_B) |
Prepares the Polygon A with intersection points in Polygon B. More... | |
TEGEOMEXPORT te::gm::LineString * | te::gm::PrepareGeometriesToIntersection (const te::gm::LineString &ls_A, const te::gm::LineString &ls_B) |
Prepares the LineString A with intersection points in LineString B. More... | |
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::LinearRing * | te::gm::SnapLineToPoints (const te::sam::rtree::Index< std::size_t, 8 > &rtree, const std::vector< te::gm::LineString > &referenceSegments, const te::gm::LinearRing &linearRingToSnap) |
Snaps a LinearRing based on a set of LineString. More... | |
TEGEOMEXPORT te::gm::Geometry * | te::gm::UnaryUnion (te::gm::Geometry *geom) |
It will get the union of the input geometries. More... | |
TEGEOMEXPORT te::gm::Geometry * | te::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... | |
Utility functions for the Geometry Module.
Definition in file Utils.h.