18#include <geos/geom/Location.h>
19#include <geos/export.h>
38using geos::geom::CoordinateXY;
48class GEOS_DLL RelateEdge {
55 static constexpr Location LOC_UNKNOWN = Location::NONE;
58 const RelateNode* node;
59 const CoordinateXY* dirPt;
61 int aDim = DIM_UNKNOWN;
66 int bDim = DIM_UNKNOWN;
75 static constexpr bool IS_FORWARD =
true;
76 static constexpr bool IS_REVERSE =
false;
77 static constexpr int DIM_UNKNOWN = -1;
81 const RelateNode* node,
const CoordinateXY* pt,
82 bool isA,
bool isForward);
85 const RelateNode* node,
const CoordinateXY* pt,
89 const RelateNode* node,
const CoordinateXY* pt,
90 bool isA, Location locLeft, Location locRight, Location locLine);
93 static RelateEdge* create(
94 const RelateNode* node,
95 const CoordinateXY* dirPt,
96 bool isA,
int dim,
bool isForward);
98 static std::size_t findKnownEdgeIndex(
99 std::vector<std::unique_ptr<RelateEdge>>& edges,
102 static void setAreaInterior(
103 std::vector<std::unique_ptr<RelateEdge>>& edges,
106 bool isInterior(
bool isA,
int position)
const;
108 Location location(
bool isA,
int position)
const;
110 int compareToEdge(
const CoordinateXY* edgeDirPt)
const;
112 void setDimLocations(
bool isA,
int dim, Location loc);
114 void setAreaInterior(
bool isA);
116 void setLocation(
bool isA,
int pos, Location loc);
118 void setAllLocations(
bool isA, Location loc);
120 void setUnknownLocations(
bool isA, Location loc);
122 void merge(
bool isA,
int dim,
bool isForward);
124 std::string toString()
const;
126 friend std::ostream& operator<<(std::ostream& os,
const RelateEdge& re);
132 void mergeSideLocation(
bool isA,
int pos, Location loc);
144 void mergeDimEdgeLoc(
bool isA, Location locEdge);
146 void setDimension(
bool isA,
int dimension);
148 void setLeft(
bool isA, Location loc);
150 void setRight(
bool isA, Location loc);
152 void setOn(
bool isA, Location loc);
154 int dimension(
bool isA)
const;
156 bool isKnown(
bool isA)
const;
158 bool isKnown(
bool isA,
int pos)
const;
160 void setLocations(
bool isA, Location locLeft, Location locRight, Location locLine);
162 void setLocationsLine(
bool isA);
164 void setLocationsArea(
bool isA,
bool isForward);
166 std::string labelString()
const;
168 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