18#include <geos/operation/relateng/NodeSections.h>
19#include <geos/geom/Coordinate.h>
20#include <geos/geom/Location.h>
21#include <geos/export.h>
30 class TopologyPredicate;
36using geos::geom::CoordinateXY;
39using geos::operation::relateng::NodeSections;
40using geos::operation::relateng::RelateGeometry;
41using geos::operation::relateng::RelateNode;
42using geos::operation::relateng::TopologyPredicate;
50class GEOS_DLL TopologyComputer {
55 TopologyPredicate& predicate;
56 RelateGeometry& geomA;
57 RelateGeometry& geomB;
58 std::map<CoordinateXY, NodeSections*> nodeMap;
59 std::deque<std::unique_ptr<NodeSections>> nodeSectionsStore;
66 void initExteriorDims();
68 void initExteriorEmpty(
bool geomNonEmpty);
70 inline RelateGeometry& getGeometry(
bool isA)
const {
71 return isA ? geomA : geomB;
74 void updateDim(Location locA, Location locB,
int dimension);
76 void updateDim(
bool isAB, Location loc1, Location loc2,
int dimension);
109 void addLineEndOnLine(
bool isLineA, Location locLineEnd, Location locLine,
const CoordinateXY* pt);
111 void addLineEndOnArea(
bool isLineA, Location locLineEnd, Location locArea,
const CoordinateXY* pt);
124 void addAreaVertexOnPoint(
bool isAreaA, Location locArea,
const CoordinateXY* pt);
126 void addAreaVertexOnLine(
bool isAreaA, Location locArea, Location locTarget,
const CoordinateXY* pt);
128 void evaluateNode(NodeSections* nodeSections);
130 void evaluateNodeEdges(
const RelateNode* node);
132 NodeSections* getNodeSections(
const CoordinateXY& nodePt);
139 TopologyPredicate& p_predicate,
140 RelateGeometry& p_geomA,
141 RelateGeometry& p_geomB)
142 : predicate(p_predicate)
149 int getDimension(
bool isA)
const;
151 bool isAreaArea()
const;
166 bool isSelfNodingRequired()
const;
168 bool isExteriorCheckRequired(
bool isA)
const;
170 bool isResultKnown()
const;
172 bool getResult()
const;
181 void addPointOnPointInterior(
const CoordinateXY* pt);
183 void addPointOnPointExterior(
bool isGeomA,
const CoordinateXY* pt);
185 void addPointOnGeometry(
bool isA, Location locTarget,
int dimTarget,
const CoordinateXY* pt);
199 void addLineEndOnGeometry(
bool isLineA, Location locLineEnd, Location locTarget,
int dimTarget,
const CoordinateXY* pt);
217 void addAreaVertex(
bool isAreaA, Location locArea, Location locTarget,
int dimTarget,
const CoordinateXY* pt);
219 void addAreaVertexOnArea(
bool isAreaA, Location locArea, Location locTarget,
const CoordinateXY* pt);
221 void evaluateNodes();
227 TopologyComputer(
const TopologyComputer&) =
delete;
228 TopologyComputer& operator=(
const TopologyComputer&) =
delete;
Definition NodeSection.h:55
Location
Constants representing the location of a point relative to a geometry.
Definition Location.h:32
Basic namespace for all GEOS functionalities.
Definition geos.h:39