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 <set>
#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 LineString * | te::gm::AddIntersectionPoints (const te::sam::rtree::Index< std::size_t, 8 > &rtree, const std::vector< te::gm::LineString > &candidateSegments, const std::set< std::size_t > &setIndexesIgnored, const te::gm::LineString &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 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 te::gm::Envelope | te::gm::CreateEnvelope (double x1, double y1, double x2, double y2) |
Creates an envelope that fits the given coordinates. It makes all the adjustments needed to return a valid envelope. More... | |
TEGEOMEXPORT te::gm::Envelope | te::gm::CreateEnvelope (const te::gm::Point &p1, const te::gm::Point &p2) |
Creates an envelope that fits the given coordinates. It makes all the adjustments needed to return a valid envelope. More... | |
TEGEOMEXPORT te::gm::LineString | te::gm::CreateLine (const te::gm::Coord2D &startCoord, const te::gm::Coord2D &endCoord, const int &srid, const int &numberOfIntermediateCoords) |
Creates a LineString between the given startCoord and endCoord with the given number of intermediate coordinates. More... | |
TEGEOMEXPORT te::gm::Polygon | te::gm::CreatePolygon (const te::gm::Envelope &box, const int &srid, const int &numberOfIntermediateCoords) |
Creates a Polygon from the given envelope and with the given number of intermediate coordinates in each of its four borders lines. More... | |
TEGEOMEXPORT double | te::gm::GetAngle (te::gm::Coord2D coordA, te::gm::Coord2D coordB) |
TEGEOMEXPORT std::vector< MultiLineString * > | te::gm::GetAsMultiLineStringVector (const te::gm::Geometry &geometry) |
Get the vector of MultLineStrings that compose the Geometry. More... | |
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... | |
TEGEOMEXPORT te::gm::GeomType | te::gm::GetMultiLineStringType (const te::gm::Geometry &geometry) |
Get the LineStrings that compose the Geometry. More... | |
TEGEOMEXPORT te::gm::GeomType | te::gm::GetMultiType (te::gm::GeomType geomType) |
Get the collection type of GeomType. More... | |
TEGEOMEXPORT te::gm::GeomType | te::gm::GetSimpleType (te::gm::GeomType geomType) |
Get the simple type of GeomType. 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 bool | te::gm::IsEqual (const te::gm::Point &p1, const te::gm::Point &p2) |
Checks if a point p1 is exactly equal to the point p2. More... | |
TEGEOMEXPORT bool | te::gm::IsEqual (const te::gm::Point &p1, const te::gm::Point &p2, double tol) |
Checks if a point p1 is equal to the point p2 considering the given tolerance. More... | |
TEGEOMEXPORT bool | te::gm::IsMultiType (te::gm::GeomType geomType) |
Verifies if the geomType is a collection type. More... | |
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 te::gm::Geometry * | te::gm::MultiLineToDefinedType (const std::vector< te::gm::MultiLineString *> &multiLineStringVector, te::gm::GeomType geometryType) |
A geometry is built based on a Vector of MultiLineString and the origin geometry type. 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 (const te::gm::Geometry *geom_A, te::gm::Geometry *geomB, bool &wasChanged) |
Prepares the geometry A with intersection points in geometry B. More... | |
TEGEOMEXPORT te::gm::Geometry * | te::gm::PrepareGeometriesToIntersection (const te::gm::Geometry *geom_A, const std::vector< te::gm::Geometry *> &vecGeomB, bool &wasChanged) |
Prepares the geometry A with intersection points in geometry B. More... | |
TEGEOMEXPORT te::gm::MultiLineString * | te::gm::PrepareGeometriesToIntersection (const te::gm::MultiLineString &mline_A, const te::sam::rtree::Index< std::size_t, 8 > &rtree, std::vector< te::gm::LineString > &vecRtreeSegments, bool &wasChanged) |
Prepares the MultiLineString A with intersection points in MultiLineString B. More... | |
TEGEOMEXPORT te::gm::LineString * | te::gm::PrepareGeometriesToIntersection (const te::gm::LineString &ls_A, const te::sam::rtree::Index< std::size_t, 8 > &rtree, std::vector< te::gm::LineString > &vecRtreeSegments, bool &wasChanged) |
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 LineString * | te::gm::SnapLineToPoints (const te::sam::rtree::Index< std::size_t, 8 > &rtree, const std::vector< te::gm::LineString > &referenceSegments, const std::set< std::size_t > &setIndexesIgnored, const te::gm::LineString &linearRingToSnap, bool &wasChanged) |
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.