17#include <geos/geom/Coordinate.h>
18#include <geos/geom/CoordinateSequence.h>
19#include <geos/algorithm/LineIntersector.h>
20#include <geos/noding/SegmentIntersector.h>
21#include <geos/noding/BasicSegmentString.h>
22#include <geos/noding/SegmentSetMutualIntersector.h>
23#include <geos/constants.h>
41namespace triangulate {
77 std::unique_ptr<CoordinateSequence> shellRing;
78 std::vector<std::unique_ptr<CoordinateSequence>> holeRings;
81 std::vector<bool> isHoleTouchingHint;
86 std::set<Coordinate> joinedPts;
88 std::unique_ptr<SegmentSetMutualIntersector> boundaryIntersector;
91 std::vector<std::unique_ptr<BasicSegmentString>> polySegStringStore;
95 class InteriorIntersectionDetector;
96 friend class PolygonHoleJoiner::InteriorIntersectionDetector;
99 void extractOrientedRings(
const Polygon* polygon);
100 static std::unique_ptr<CoordinateSequence> extractOrientedRing(
const LinearRing* ring,
bool isCW);
131 void joinNonTouchingHole(
147 std::size_t findJoinIndex(
160 static bool isLineInterior(
162 std::size_t ringIndex,
165 static std::size_t prev(std::size_t i, std::size_t size);
166 static std::size_t next(std::size_t i, std::size_t size);
181 std::size_t joinIndex,
183 std::size_t holeJoinIndex);
195 std::vector<Coordinate> createHoleSection(
197 std::size_t holeJoinIndex,
206 static std::vector<const LinearRing*> sortHoles(
209 static std::size_t findLowestLeftVertexIndex(
220 bool intersectsBoundary(
224 std::unique_ptr<SegmentSetMutualIntersector> createBoundaryIntersector();
230 : inputPolygon(p_inputPolygon)
231 , boundaryIntersector(
nullptr)
242 const Polygon* p_inputPolygon);
251 static std::unique_ptr<CoordinateSequence>
join(
252 const Polygon* p_inputPolygon);
259 std::unique_ptr<CoordinateSequence>
compute();
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Represents a list of contiguous line segments, and supports noding the segments.
Definition: BasicSegmentString.h:44
An intersector for the red-blue intersection problem.
Definition: SegmentSetMutualIntersector.h:36
Definition: PolygonHoleJoiner.h:62
static std::unique_ptr< CoordinateSequence > join(const Polygon *p_inputPolygon)
static std::unique_ptr< Polygon > joinAsPolygon(const Polygon *p_inputPolygon)
std::unique_ptr< CoordinateSequence > compute()
Basic namespace for all GEOS functionalities.
Definition: geos.h:38