Go to the documentation of this file.
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_GEOMETRYFUNCTIONS_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_GEOMETRYFUNCTIONS_H
62 static bool IsEqual(
double x1,
double y1,
double x2,
double y2);
237 if (distance1 < distance2)
264 if (distance1 < distance2)
275 #endif // __TERRALIB_GEOMETRY_INTERNAL_GEOMETRYFUNCTIONS_H
static te::gm::GeometryVector AddProjectedCoordinates(const te::gm::GeometryVectorConst &geometryVector, double distance, bool &wasChanged)
Detects and adds all the coordinates from given geometryVector which projected coordinates lies withi...
A point with x and y coordinate values.
static void populateCoordinateIndex(const te::gm::Geometry *geometry, te::gm::KdTreeSingle &spatialIndex)
static double PerpendicularSquaredDistance(const te::gm::Coord2D &first, const te::gm::Coord2D &last, const te::gm::Coord2D &pin, te::gm::Coord2D &projectedCoordinate, bool &isOnSegment)
Calculate the perpendicular squared distance of a point in a segment.
static bool IsEqual(const te::gm::Point &p1, const te::gm::Point &p2)
Checks if a point p1 is exactly equal to the point p2.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
static bool IsEqual(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2)
Checks if a coordinate c1 is exactly equal to the coordinate c2.
A class that represents a two dimensional K-d Tree (2-d Tree).
static double CalculateDistance(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2)
Calculates the distance between c1 and c2.
static double CalculateSquaredDistance(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2)
Calculates the squared distance between c1 and c2, that is, the distance calculation without the fina...
std::vector< const te::gm::Geometry * > GeometryVectorConst
static double PerpendicularDistance(const te::gm::Point &first, const te::gm::Point &last, const te::gm::Point &pin, te::gm::Point &projectedPoint, bool &isOnSegment)
Calculate the perpendicular distance of a point in a segment.
std::vector< te::gm::Geometry * > GeometryVector
static void populateCoordinateIndex(const te::gm::GeometryVectorConst &geometryVector, te::gm::KdTreeSingle &spatialIndex)
static bool IsWithinDistance(const te::gm::Point &p1, const te::gm::Point &p2, double distance)
Checks in an optimized way if the given coordinates are within the given distance....
PointDistanceOrderFunctor(const te::gm::Point &reference)
bool operator()(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2) const
static bool IsOnLine(const te::gm::Coord2D &coordToCheck, const te::gm::Coord2D &c1, const te::gm::Coord2D &c2)
Checks if the given coordToCheck lies within the line.
CoordDistanceOrderFunctor(const te::gm::Coord2D &reference)
static double PerpendicularDistance(const te::gm::Coord2D &first, const te::gm::Coord2D &last, const te::gm::Coord2D &pin, te::gm::Coord2D &projectedCoordinate, bool &isOnSegment)
Calculate the perpendicular distance of a point in a segment.
bool operator()(const te::gm::Point &p1, const te::gm::Point &p2) const
An utility struct for representing 2D coordinates.
te::gm::Coord2D m_reference
static double PerpendicularSquaredDistance(const te::gm::Point &first, const te::gm::Point &last, const te::gm::Point &pin, Point &projectedPoint, bool &isOnSegment)
Calculate the perpendicular squared distance of a point in a segment.
te::gm::Point m_reference
Proxy configuration file for TerraView (see terraview_config.h).
This local struct is used sorts a vector of points by distance.
Utility classes, structures and definitions for Vector Processing.
static double CalculateSquaredDistance(const te::gm::Point &p1, const te::gm::Point &p2)
Calculates the squared distance between p1 and p2, that is, the distance calculation without the fina...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
static void getCoordinates(const te::gm::Geometry *geometry, std::vector< te::gm::Coord2D > &vecCoords)
This local struct is used sorts a vector of coordinates by distance.
static bool IsEqual(double x1, double y1, double x2, double y2)
Checks if a coordinate (x1, x2) is exactly equal to the coordinate (x2, y2)
A point with x and y coordinate values.
static void buildIndex(const std::vector< te::gm::Coord2D > &vecCoords, te::gm::KdTreeSingle &spatialIndex)
static bool IsWithinDistance(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2, double distance)
Checks in an optimized way if the given coordinates are within the given distance....