86class GEOS_DLL RelateNG {
87 using CoordinateXY = geos::geom::CoordinateXY;
99 const BoundaryNodeRule& boundaryNodeRule;
100 RelateGeometry geomA;
101 std::unique_ptr<MCIndexSegmentSetMutualIntersector> edgeMutualInt =
nullptr;
105 RelateNG(
const Geometry* inputA,
bool isPrepared,
const BoundaryNodeRule& bnRule)
106 : boundaryNodeRule(bnRule)
107 , geomA(inputA, isPrepared, bnRule)
110 RelateNG(
const Geometry* inputA,
bool isPrepared)
114 bool hasRequiredEnvelopeInteraction(
const Geometry* b, TopologyPredicate&
predicate);
116 bool finishValue(TopologyPredicate&
predicate);
118 void computePP(RelateGeometry& geomB, TopologyComputer& topoComputer);
120 void computeAtPoints(RelateGeometry&
geom,
bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
122 bool computePoints(RelateGeometry&
geom,
bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
124 void computePoint(
bool isA,
const CoordinateXY* pt, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
126 bool computeLineEnds(RelateGeometry&
geom,
bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
141 bool computeLineEnd(RelateGeometry&
geom,
bool isA,
const CoordinateXY* pt, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
143 bool computeAreaVertex(RelateGeometry&
geom,
bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
145 bool computeAreaVertex(RelateGeometry&
geom,
bool isA,
const LinearRing* ring, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
147 void computeAtEdges(RelateGeometry& geomB, TopologyComputer& topoComputer);
149 void computeEdgesAll(std::vector<const SegmentString*>& edgesB,
const Envelope* envInt, EdgeSegmentIntersector& intersector);
151 void computeEdgesMutual(std::vector<const SegmentString*>& edgesB,
const Envelope* envInt, EdgeSegmentIntersector& intersector);
166 static bool relate(
const Geometry* a,
const Geometry* b, TopologyPredicate& pred);
179 static bool relate(
const Geometry* a,
const Geometry* b, TopologyPredicate& pred,
const BoundaryNodeRule& bnRule);
192 static bool relate(
const Geometry* a,
const Geometry* b,
const std::string& imPattern);
202 static std::unique_ptr<IntersectionMatrix>
relate(
const Geometry* a,
const Geometry* b);
213 static std::unique_ptr<IntersectionMatrix>
relate(
const Geometry* a,
const Geometry* b,
const BoundaryNodeRule& bnRule);
222 static std::unique_ptr<RelateNG>
prepare(
const Geometry* a);
233 static std::unique_ptr<RelateNG>
prepare(
const Geometry* a,
const BoundaryNodeRule& bnRule);
242 std::unique_ptr<IntersectionMatrix>
evaluate(
const Geometry* b);
255 bool evaluate(
const Geometry* b,
const std::string& imPattern);
267 static bool intersects(
const Geometry* a,
const Geometry* b);
268 static bool crosses(
const Geometry* a,
const Geometry* b);
269 static bool disjoint(
const Geometry* a,
const Geometry* b);
270 static bool touches(
const Geometry* a,
const Geometry* b);
271 static bool within(
const Geometry* a,
const Geometry* b);
272 static bool contains(
const Geometry* a,
const Geometry* b);
273 static bool overlaps(
const Geometry* a,
const Geometry* b);
274 static bool covers(
const Geometry* a,
const Geometry* b);
275 static bool coveredBy(
const Geometry* a,
const Geometry* b);
276 static bool equalsTopo(
const Geometry* a,
const Geometry* b);
278 bool intersects(
const Geometry* a);
279 bool crosses(
const Geometry* a);
280 bool disjoint(
const Geometry* a);
281 bool touches(
const Geometry* a);
282 bool within(
const Geometry* a);
283 bool contains(
const Geometry* a);
284 bool overlaps(
const Geometry* a);
285 bool covers(
const Geometry* a);
286 bool coveredBy(
const Geometry* a);
287 bool equalsTopo(
const Geometry* a);
288 bool relate(
const Geometry* a,
const std::string& pat);
289 std::unique_ptr<IntersectionMatrix>
relate(
const Geometry* a);