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>
30 class CoordinateSequence;
34 class OverlayEdgeRing;
35 class MaximalEdgeRing;
49 using CoordinateXYZM = geos::geom::CoordinateXYZM;
65 bool m_isInResultArea;
66 bool m_isInResultLine;
69 const OverlayEdgeRing* edgeRing;
70 const MaximalEdgeRing* maxEdgeRing;
81 OverlayEdge(
const CoordinateXYZM& p_orig,
const CoordinateXYZM& p_dirPt,
86 , direction(p_direction)
89 , m_isInResultArea(
false)
90 , m_isInResultLine(
false)
92 , nextResultEdge(
nullptr)
94 , maxEdgeRing(
nullptr)
95 , nextResultMaxEdge(
nullptr)
100 bool isForward()
const
115 Location getLocation(uint8_t index,
int position)
const
117 return label->
getLocation(index, position, direction);
120 const CoordinateXYZM& getCoordinate()
const
125 const CoordinateSequence* getCoordinatesRO()
const
130 std::unique_ptr<CoordinateSequence> getCoordinates()
136 std::unique_ptr<CoordinateSequence> getCoordinatesOriented();
159 bool isInResultArea()
const
161 return m_isInResultArea;
164 bool isInResultAreaBoth()
const
166 return m_isInResultArea && symOE()->m_isInResultArea;
169 bool isInResultEither()
const
171 return isInResult() || symOE()->isInResult();
174 void unmarkFromResultAreaBoth()
176 m_isInResultArea =
false;
177 symOE()->m_isInResultArea =
false;
180 void markInResultArea()
182 m_isInResultArea =
true;
185 void markInResultAreaBoth()
187 m_isInResultArea =
true;
188 symOE()->m_isInResultArea =
true;
191 bool isInResultLine()
const
193 return m_isInResultLine;
196 void markInResultLine()
198 m_isInResultLine =
true;
199 symOE()->m_isInResultLine =
true;
202 bool isInResult()
const
204 return m_isInResultArea || m_isInResultLine;
207 void setNextResult(OverlayEdge* e)
213 OverlayEdge* nextResult()
const
215 return nextResultEdge;
218 bool isResultLinked()
const
220 return nextResultEdge !=
nullptr;
223 void setNextResultMax(OverlayEdge* e)
226 nextResultMaxEdge = e;
229 OverlayEdge* nextResultMax()
const
231 return nextResultMaxEdge;
234 bool isResultMaxLinked()
const
236 return nextResultMaxEdge !=
nullptr;
239 bool isVisited()
const
244 void markVisitedBoth()
247 symOE()->markVisited();
250 void setEdgeRing(
const OverlayEdgeRing* p_edgeRing)
252 edgeRing = p_edgeRing;
255 const OverlayEdgeRing* getEdgeRing()
const
260 const MaximalEdgeRing* getEdgeRingMax()
const
265 void setEdgeRingMax(
const MaximalEdgeRing* p_maximalEdgeRing)
267 maxEdgeRing = p_maximalEdgeRing;
270 friend std::ostream& operator<<(std::ostream& os,
const OverlayEdge& oe);
271 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:217
Definition: OverlayEdge.h:47
const CoordinateXYZM & directionPt() const override
Definition: OverlayEdge.h:105
void addCoordinates(CoordinateSequence *coords) const
Definition: OverlayLabel.h:86
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:370
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