17 #include <geos/geom/Coordinate.h> 18 #include <geos/noding/SegmentSetMutualIntersector.h> 20 #include <unordered_map> 43 namespace triangulate {
65 static constexpr
double EPS = 1.0E-4;
67 std::vector<Coordinate> shellCoords;
70 std::set<Coordinate> shellCoordsSorted;
73 std::unordered_map<Coordinate, std::vector<Coordinate>, Coordinate::HashCode> cutMap;
75 std::unique_ptr<noding::SegmentSetMutualIntersector> polygonIntersector;
80 std::vector<std::unique_ptr<noding::SegmentString>> polySegStringStore;
84 static std::vector<Coordinate> ringCoordinates(
const LinearRing* ring);
111 std::size_t getShellCoordIndexSkip(
const Coordinate& coord, std::size_t numSkip);
121 std::vector<Coordinate> findLeftShellVertices(
const Coordinate& holeCoord);
150 void addHoleToShell(std::size_t shellVertexIndex,
const CoordinateSequence* holeCoords, std::size_t holeVertexIndex);
158 static std::vector<const LinearRing*> sortHoles(
const Polygon* poly);
166 static std::vector<std::size_t> findLeftVertices(
const LinearRing* ring);
168 std::unique_ptr<noding::SegmentSetMutualIntersector> createPolygonIntersector(
const Polygon* polygon);
175 static std::vector<Coordinate> join(
const Polygon* inputPolygon);
176 static std::unique_ptr<Polygon> joinAsPolygon(
const Polygon* inputPolygon);
183 std::vector<Coordinate> compute();
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Definition: PolygonHoleJoiner.h:59
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple...
Definition: LinearRing.h:55
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:44