19 #ifndef GEOS_ALGORITHM_CENTRALENDPOINTINTERSECTOR_H 20 #define GEOS_ALGORITHM_CENTRALENDPOINTINTERSECTOR_H 30 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 100 std::vector<geom::Coordinate>
_pts;
108 _intPt = findNearestPoint(centroid, _pts);
113 const std::vector<geom::Coordinate>& pts)
116 size_t n = pts.size();
120 for(std::size_t i = 0; i < n; ++i) {
141 const std::vector<geom::Coordinate>& pts)
const 143 double minDistSq = std::numeric_limits<double>::max();
145 for(std::size_t i = 0, n = pts.size(); i < n; ++i) {
147 if(distSq < minDistSq) {
163 #endif // GEOS_ALGORITHM_CENTRALENDPOINTINTERSECTOR_H
double distanceSquared(const Coordinate &p) const
static Coordinate & getNull()
Coordinate is the lightweight class used to store coordinates.
const geom::Coordinate & getIntersection() const
geom::Coordinate findNearestPoint(const geom::Coordinate &p, const std::vector< geom::Coordinate > &pts) const
static const geom::Coordinate & getIntersection(const geom::Coordinate &p00, const geom::Coordinate &p01, const geom::Coordinate &p10, const geom::Coordinate &p11)
Basic namespace for all GEOS functionalities.
Computes an approximate intersection of two line segments by taking the most central of the endpoints...
std::vector< geom::Coordinate > _pts
CentralEndpointIntersector(const geom::Coordinate &p00, const geom::Coordinate &p01, const geom::Coordinate &p10, const geom::Coordinate &p11)
static geom::Coordinate average(const std::vector< geom::Coordinate > &pts)