21#include <geos/algorithm/LineIntersector.h>
22#include <geos/geom/CoordinateSequence.h>
23#include <geos/geom/Envelope.h>
24#include <geos/geom/Geometry.h>
25#include <geos/geom/GeometryCollection.h>
26#include <geos/geom/LinearRing.h>
27#include <geos/geom/LineString.h>
28#include <geos/geom/Polygon.h>
29#include <geos/noding/IntersectionAdder.h>
30#include <geos/noding/Noder.h>
31#include <geos/noding/SegmentString.h>
32#include <geos/operation/overlayng/Edge.h>
33#include <geos/operation/overlayng/EdgeSourceInfo.h>
34#include <geos/operation/overlayng/LineLimiter.h>
35#include <geos/operation/overlayng/RingClipper.h>
38#include <geos/export.h>
77 static constexpr int MIN_LIMIT_PTS = 20;
78 static constexpr bool IS_NODING_VALIDATED =
true;
82 std::unique_ptr<std::vector<noding::SegmentString*>> inputEdges;
84 std::array<bool, 2> hasEdges;
86 std::unique_ptr<RingClipper> clipper;
87 std::unique_ptr<LineLimiter> limiter;
92 std::unique_ptr<noding::Noder> internalNoder;
93 std::unique_ptr<noding::Noder> spareInternalNoder;
95 std::deque<EdgeSourceInfo> edgeSourceInfoQue;
96 std::deque<Edge> edgeQue;
109 static std::unique_ptr<noding::Noder> createFixedPrecisionNoder(
const PrecisionModel* pm);
110 std::unique_ptr<noding::Noder> createFloatingPrecisionNoder(
bool doValidation);
114 void addGeometryCollection(
const GeometryCollection* gc, uint8_t geomIndex,
int expectedDim);
115 void addPolygon(
const Polygon* poly, uint8_t geomIndex);
116 void addPolygonRing(
const LinearRing* ring,
bool isHole, uint8_t geomIndex);
117 void addLine(
const LineString* line, uint8_t geomIndex);
118 void addLine(std::unique_ptr<CoordinateSequence>& pts, uint8_t geomIndex);
119 void addEdge(std::unique_ptr<CoordinateSequence>& cas,
const EdgeSourceInfo* info);
122 const EdgeSourceInfo* createEdgeSourceInfo(uint8_t index,
int depthDelta,
bool isHole);
129 bool isClippedCompletely(
const Envelope* env)
const;
136 bool isToBeLimited(
const LineString* line)
const;
143 std::vector<std::unique_ptr<CoordinateSequence>>& limit(
const LineString* line);
159 std::unique_ptr<CoordinateSequence> clip(
const LinearRing* line);
168 static std::unique_ptr<CoordinateSequence> removeRepeatedPoints(
const LineString* line);
170 static int computeDepthDelta(
const LinearRing* ring,
bool isHole);
172 void add(
const Geometry* g, uint8_t geomIndex);
180 std::vector<Edge*> node(std::vector<noding::SegmentString*>* segStrings);
181 std::vector<Edge*> createEdges(std::vector<noding::SegmentString*>* segStrings);
193 , inputEdges(new std::vector<noding::SegmentString*>)
194 , customNoder(p_customNoder)
195 , hasEdges{{
false,
false}}
209 void setClipEnvelope(
const Envelope* clipEnv);
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
Definition LineString.h:66
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
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:88
Computes the intersections between two line segments in SegmentString and adds them to each string.
Definition IntersectionAdder.h:54
Computes all intersections between segments in a set of SegmentString.
Definition Noder.h:46
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
Definition EdgeNodingBuilder.h:64
bool hasEdgesFor(uint8_t geomIndex) const
std::vector< Edge * > build(const Geometry *geom0, const Geometry *geom1)
EdgeNodingBuilder(const PrecisionModel *p_pm, noding::Noder *p_customNoder)
Definition EdgeNodingBuilder.h:191
Definition EdgeSourceInfo.h:38
Basic namespace for all GEOS functionalities.
Definition geos.h:39