18#include <geos/operation/relateng/RelateEdge.h>
24#include <geos/export.h>
45class GEOS_DLL RelateNode {
46 using CoordinateXY = geos::geom::CoordinateXY;
57 std::vector<std::unique_ptr<RelateEdge>> edges;
59 const CoordinateXY* nodePt;
64 void updateEdgesInArea(
bool isA, std::size_t indexFrom, std::size_t indexTo);
66 void updateIfAreaPrev(
bool isA, std::size_t index);
68 void updateIfAreaNext(
bool isA, std::size_t index);
70 const RelateEdge* addLineEdge(
bool isA,
const CoordinateXY* dirPt);
72 const RelateEdge* addAreaEdge(
bool isA,
const CoordinateXY* dirPt,
bool isForward);
84 const RelateEdge* addEdge(
bool isA,
const CoordinateXY* dirPt,
int dim,
bool isForward);
86 void finishNode(
bool isA,
bool isAreaInterior);
88 void propagateSideLocations(
bool isA, std::size_t startIndex);
90 static std::size_t prevIndex(std::vector<std::unique_ptr<RelateEdge>>& list, std::size_t index);
92 static std::size_t nextIndex(std::vector<std::unique_ptr<RelateEdge>>& list, std::size_t i);
95 const std::vector<std::unique_ptr<RelateEdge>>& edges,
96 const RelateEdge* edge)
const;
101 RelateNode(
const CoordinateXY* pt)
105 const CoordinateXY* getCoordinate()
const;
107 const std::vector<std::unique_ptr<RelateEdge>>& getEdges()
const;
109 void addEdges(std::vector<const NodeSection *>& nss);
110 void addEdges(std::vector<std::unique_ptr<NodeSection>>& nss);
112 void addEdges(
const NodeSection* ns);
123 void finish(
bool isAreaInteriorA,
bool isAreaInteriorB);
125 std::string toString()
const;
127 bool hasExteriorEdge(
bool isA);
129 friend std::ostream& operator<<(std::ostream& os,
const RelateNode& ns);
135 RelateNode(
const RelateNode&) =
delete;
136 RelateNode& operator=(
const RelateNode&) =
delete;
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
Basic namespace for all GEOS functionalities.
Definition geos.h:39