18#include <geos/geom/Location.h>
19#include <geos/export.h>
42class GEOS_DLL RelateEdge {
43 using CoordinateXY = geos::geom::CoordinateXY;
52 static constexpr Location LOC_UNKNOWN = Location::NONE;
55 const RelateNode* node;
56 const CoordinateXY* dirPt;
58 int aDim = DIM_UNKNOWN;
63 int bDim = DIM_UNKNOWN;
72 static constexpr bool IS_FORWARD =
true;
73 static constexpr bool IS_REVERSE =
false;
74 static constexpr int DIM_UNKNOWN = -1;
78 const RelateNode* node,
const CoordinateXY* pt,
79 bool isA,
bool isForward);
82 const RelateNode* node,
const CoordinateXY* pt,
86 const RelateNode* node,
const CoordinateXY* pt,
87 bool isA, Location locLeft, Location locRight, Location locLine);
90 static RelateEdge* create(
91 const RelateNode* node,
92 const CoordinateXY* dirPt,
93 bool isA,
int dim,
bool isForward);
95 static std::size_t findKnownEdgeIndex(
96 std::vector<std::unique_ptr<RelateEdge>>& edges,
99 static void setAreaInterior(
100 std::vector<std::unique_ptr<RelateEdge>>& edges,
103 bool isInterior(
bool isA,
int position)
const;
105 Location location(
bool isA,
int position)
const;
107 int compareToEdge(
const CoordinateXY* edgeDirPt)
const;
109 void setDimLocations(
bool isA,
int dim, Location loc);
111 void setAreaInterior(
bool isA);
113 void setLocation(
bool isA,
int pos, Location loc);
115 void setAllLocations(
bool isA, Location loc);
117 void setUnknownLocations(
bool isA, Location loc);
119 void merge(
bool isA,
int dim,
bool isForward);
121 std::string toString()
const;
123 friend std::ostream& operator<<(std::ostream& os,
const RelateEdge& re);
129 void mergeSideLocation(
bool isA,
int pos, Location loc);
141 void mergeDimEdgeLoc(
bool isA, Location locEdge);
143 void setDimension(
bool isA,
int dimension);
145 void setLeft(
bool isA, Location loc);
147 void setRight(
bool isA, Location loc);
149 void setOn(
bool isA, Location loc);
151 int dimension(
bool isA)
const;
153 bool isKnown(
bool isA)
const;
155 bool isKnown(
bool isA,
int pos)
const;
157 void setLocations(
bool isA, Location locLeft, Location locRight, Location locLine);
159 void setLocationsLine(
bool isA);
161 void setLocationsArea(
bool isA,
bool isForward);
163 std::string labelString()
const;
165 std::string locationString(
bool isA)
const;
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
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