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)
A point with x and y coordinate values.
static double CalculateDistance(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2)
Calculates the distance between c1 and c2.
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.
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.
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.
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....
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...
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.
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...
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.
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 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...
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)
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....
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.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A point with x and y coordinate values.
static void getCoordinates(const te::gm::Geometry *geometry, std::vector< te::gm::Coord2D > &vecCoords)
static void populateCoordinateIndex(const te::gm::Geometry *geometry, te::gm::KdTreeSingle &spatialIndex)
static void populateCoordinateIndex(const te::gm::GeometryVectorConst &geometryVector, te::gm::KdTreeSingle &spatialIndex)
static void buildIndex(const std::vector< te::gm::Coord2D > &vecCoords, te::gm::KdTreeSingle &spatialIndex)
A class that represents a two dimensional K-d Tree (2-d Tree).
std::vector< te::gm::Geometry * > GeometryVector
std::vector< const te::gm::Geometry * > GeometryVectorConst
An utility struct for representing 2D coordinates.
This local struct is used sorts a vector of coordinates by distance.
CoordDistanceOrderFunctor(const te::gm::Coord2D &reference)
bool operator()(const te::gm::Coord2D &c1, const te::gm::Coord2D &c2) const
te::gm::Coord2D m_reference
This local struct is used sorts a vector of points by distance.
te::gm::Point m_reference
PointDistanceOrderFunctor(const te::gm::Point &reference)
bool operator()(const te::gm::Point &p1, const te::gm::Point &p2) const
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).
Utility classes, structures and definitions for Vector Processing.