17 #include <geos/edgegraph/HalfEdge.h>
18 #include <geos/geom/CoordinateSequence.h>
19 #include <geos/geom/Location.h>
20 #include <geos/operation/overlayng/OverlayEdge.h>
21 #include <geos/operation/overlayng/OverlayLabel.h>
22 #include <geos/export.h>
34 class OverlayEdgeRing;
35 class MaximalEdgeRing;
41 using geos::geom::CoordinateXYZM;
66 bool m_isInResultArea;
67 bool m_isInResultLine;
70 const OverlayEdgeRing* edgeRing;
71 const MaximalEdgeRing* maxEdgeRing;
82 OverlayEdge(
const CoordinateXYZM& p_orig,
const CoordinateXYZM& p_dirPt,
87 , direction(p_direction)
90 , m_isInResultArea(
false)
91 , m_isInResultLine(
false)
93 , nextResultEdge(
nullptr)
95 , maxEdgeRing(
nullptr)
96 , nextResultMaxEdge(
nullptr)
101 bool isForward()
const
116 Location getLocation(uint8_t index,
int position)
const
118 return label->
getLocation(index, position, direction);
121 const CoordinateXYZM& getCoordinate()
const
131 std::unique_ptr<CoordinateSequence> getCoordinates()
137 std::unique_ptr<CoordinateSequence> getCoordinatesOriented();
160 bool isInResultArea()
const
162 return m_isInResultArea;
165 bool isInResultAreaBoth()
const
167 return m_isInResultArea && symOE()->m_isInResultArea;
170 bool isInResultEither()
const
172 return isInResult() || symOE()->isInResult();
175 void unmarkFromResultAreaBoth()
177 m_isInResultArea =
false;
178 symOE()->m_isInResultArea =
false;
181 void markInResultArea()
183 m_isInResultArea =
true;
186 void markInResultAreaBoth()
188 m_isInResultArea =
true;
189 symOE()->m_isInResultArea =
true;
192 bool isInResultLine()
const
194 return m_isInResultLine;
197 void markInResultLine()
199 m_isInResultLine =
true;
200 symOE()->m_isInResultLine =
true;
203 bool isInResult()
const
205 return m_isInResultArea || m_isInResultLine;
208 void setNextResult(OverlayEdge* e)
214 OverlayEdge* nextResult()
const
216 return nextResultEdge;
219 bool isResultLinked()
const
221 return nextResultEdge !=
nullptr;
224 void setNextResultMax(OverlayEdge* e)
227 nextResultMaxEdge = e;
230 OverlayEdge* nextResultMax()
const
232 return nextResultMaxEdge;
235 bool isResultMaxLinked()
const
237 return nextResultMaxEdge !=
nullptr;
240 bool isVisited()
const
245 void markVisitedBoth()
248 symOE()->markVisited();
251 void setEdgeRing(
const OverlayEdgeRing* p_edgeRing)
253 edgeRing = p_edgeRing;
256 const OverlayEdgeRing* getEdgeRing()
const
261 const MaximalEdgeRing* getEdgeRingMax()
const
266 void setEdgeRingMax(
const MaximalEdgeRing* p_maximalEdgeRing)
268 maxEdgeRing = p_maximalEdgeRing;
271 friend std::ostream& operator<<(std::ostream& os,
const OverlayEdge& oe);
272 std::string resultSymbol()
const;
Definition: HalfEdge.h:56
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
Definition: OverlayEdge.h:52
const CoordinateXYZM & directionPt() const override
Definition: OverlayEdge.h:106
void addCoordinates(CoordinateSequence *coords) const
Definition: OverlayLabel.h:89
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:371
std::unique_ptr< CoordinateSequence > clone() const
Returns a heap-allocated deep copy of this CoordinateSequence.
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25