21 #include <geos/algorithm/LineIntersector.h>
22 #include <geos/algorithm/Orientation.h>
23 #include <geos/geom/Coordinate.h>
24 #include <geos/geom/CoordinateSequence.h>
25 #include <geos/geom/CoordinateSequence.h>
26 #include <geos/geom/Envelope.h>
27 #include <geos/geom/Geometry.h>
28 #include <geos/geom/GeometryCollection.h>
29 #include <geos/geom/LinearRing.h>
30 #include <geos/geom/LineString.h>
31 #include <geos/geom/MultiLineString.h>
32 #include <geos/geom/MultiPolygon.h>
33 #include <geos/geom/Polygon.h>
34 #include <geos/noding/IntersectionAdder.h>
35 #include <geos/noding/MCIndexNoder.h>
36 #include <geos/noding/Noder.h>
37 #include <geos/noding/NodedSegmentString.h>
38 #include <geos/noding/SegmentString.h>
39 #include <geos/noding/ValidatingNoder.h>
40 #include <geos/noding/snapround/SnapRoundingNoder.h>
41 #include <geos/operation/overlayng/Edge.h>
42 #include <geos/operation/overlayng/EdgeSourceInfo.h>
43 #include <geos/operation/overlayng/InputGeometry.h>
44 #include <geos/operation/overlayng/LineLimiter.h>
45 #include <geos/operation/overlayng/OverlayUtil.h>
46 #include <geos/operation/overlayng/RingClipper.h>
47 #include <geos/operation/valid/RepeatedPointRemover.h>
50 #include <geos/export.h>
85 static constexpr
int MIN_LIMIT_PTS = 20;
86 static constexpr
bool IS_NODING_VALIDATED =
true;
90 std::unique_ptr<std::vector<SegmentString*>> inputEdges;
92 std::array<bool, 2> hasEdges;
94 std::unique_ptr<RingClipper> clipper;
95 std::unique_ptr<LineLimiter> limiter;
100 std::unique_ptr<Noder> internalNoder;
101 std::unique_ptr<Noder> spareInternalNoder;
103 std::deque<EdgeSourceInfo> edgeSourceInfoQue;
104 std::deque<Edge> edgeQue;
117 static std::unique_ptr<Noder> createFixedPrecisionNoder(
const PrecisionModel* pm);
118 std::unique_ptr<Noder> createFloatingPrecisionNoder(
bool doValidation);
122 void addGeometryCollection(
const GeometryCollection* gc, uint8_t geomIndex,
int expectedDim);
123 void addPolygon(
const Polygon* poly, uint8_t geomIndex);
124 void addPolygonRing(
const LinearRing* ring,
bool isHole, uint8_t geomIndex);
125 void addLine(
const LineString* line, uint8_t geomIndex);
126 void addLine(std::unique_ptr<CoordinateSequence>& pts, uint8_t geomIndex);
127 void addEdge(std::unique_ptr<CoordinateSequence>& cas,
const EdgeSourceInfo* info);
130 const EdgeSourceInfo* createEdgeSourceInfo(uint8_t index,
int depthDelta,
bool isHole);
137 bool isClippedCompletely(
const Envelope* env)
const;
144 bool isToBeLimited(
const LineString* line)
const;
151 std::vector<std::unique_ptr<CoordinateSequence>>& limit(
const LineString* line);
167 std::unique_ptr<CoordinateSequence> clip(
const LinearRing* line);
176 static std::unique_ptr<CoordinateSequence> removeRepeatedPoints(
const LineString* line);
178 static int computeDepthDelta(
const LinearRing* ring,
bool isHole);
180 void add(
const Geometry* g, uint8_t geomIndex);
188 std::vector<Edge*> node(std::vector<SegmentString*>* segStrings);
189 std::vector<Edge*> createEdges(std::vector<SegmentString*>* segStrings);
202 , customNoder(p_customNoder)
203 , hasEdges{{
false,
false}}
217 void setClipEnvelope(
const Envelope* clipEnv);