19 #ifndef GEOS_ALGORITHM_CENTRALENDPOINTINTERSECTOR_H
20 #define GEOS_ALGORITHM_CENTRALENDPOINTINTERSECTOR_H
22 #include <geos/export.h>
23 #include <geos/geom/Coordinate.h>
30 #pragma warning(disable: 4251)
72 return intor.getIntersection();
90 getIntersection()
const
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) {
146 double distSq = p.distanceSquared(pts[i]);
147 if(distSq < minDistSq) {
Computes an approximate intersection of two line segments by taking the most central of the endpoints...
Definition: CentralEndpointIntersector.h:62
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
double y
y-coordinate
Definition: Coordinate.h:83
double x
x-coordinate
Definition: Coordinate.h:80
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26