19 #ifndef GEOS_NODING_INTERSECTIONADDER_H
20 #define GEOS_NODING_INTERSECTIONADDER_H
22 #include <geos/export.h>
28 #include <geos/inline.h>
30 #include <geos/geom/Coordinate.h>
31 #include <geos/noding/SegmentIntersector.h>
42 class LineIntersector;
60 class GEOS_DLL IntersectionAdder:
public SegmentIntersector {
68 bool hasIntersectionVar;
70 bool hasProperInterior;
74 const geom::Coordinate* properIntersectionPoint;
76 algorithm::LineIntersector& li;
86 bool isTrivialIntersection(
const SegmentString* e0,
size_t segIndex0,
87 const SegmentString* e1,
size_t segIndex1);
90 IntersectionAdder(
const IntersectionAdder& other) =
delete;
91 IntersectionAdder& operator=(
const IntersectionAdder& rhs) =
delete;
96 int numInteriorIntersections;
97 int numProperIntersections;
102 IntersectionAdder(algorithm::LineIntersector& newLi)
104 hasIntersectionVar(false),
106 hasProperInterior(false),
108 properIntersectionPoint(nullptr),
111 numInteriorIntersections(0),
112 numProperIntersections(0),
116 algorithm::LineIntersector&
127 getProperIntersectionPoint()
129 return properIntersectionPoint;
135 return hasIntersectionVar;
148 hasProperIntersection()
158 hasProperInteriorIntersection()
160 return hasProperInterior;
168 hasInteriorIntersection()
182 void processIntersections(
188 isAdjacentSegments(
size_t i1,
size_t i2)
190 return (i1 > i2 ? i1 - i2 : i2 - i1) == 1;
199 isDone()
const override
209 #endif // GEOS_NODING_INTERSECTIONADDER_H