49 using CoordinateXY = geos::geom::CoordinateXY;
50 using CoordinateXYZM = geos::geom::CoordinateXYZM;
57 std::shared_ptr<const CoordinateSequence> pts;
66 bool m_isInResultArea;
67 bool m_isInResultLine;
70 const OverlayEdgeRing* edgeRing;
71 const MaximalEdgeRing* maxEdgeRing;
82 OverlayEdge(
const CoordinateXYZM& p_orig,
const CoordinateXY& p_dirPt,
84 const std::shared_ptr<const CoordinateSequence>& p_pts)
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
126 const CoordinateSequence* getCoordinatesRO()
const
131 std::shared_ptr<const CoordinateSequence> getCoordinatesOriented()
const;
154 bool isInResultArea()
const
156 return m_isInResultArea;
159 bool isInResultAreaBoth()
const
161 return m_isInResultArea && symOE()->m_isInResultArea;
164 bool isInResultEither()
const
166 return isInResult() || symOE()->isInResult();
169 void unmarkFromResultAreaBoth()
171 m_isInResultArea =
false;
172 symOE()->m_isInResultArea =
false;
175 void markInResultArea()
177 m_isInResultArea =
true;
180 void markInResultAreaBoth()
182 m_isInResultArea =
true;
183 symOE()->m_isInResultArea =
true;
186 bool isInResultLine()
const
188 return m_isInResultLine;
191 void markInResultLine()
193 m_isInResultLine =
true;
194 symOE()->m_isInResultLine =
true;
197 bool isInResult()
const
199 return m_isInResultArea || m_isInResultLine;
202 void setNextResult(OverlayEdge* e)
208 OverlayEdge* nextResult()
const
210 return nextResultEdge;
213 bool isResultLinked()
const
215 return nextResultEdge !=
nullptr;
218 void setNextResultMax(OverlayEdge* e)
221 nextResultMaxEdge = e;
224 OverlayEdge* nextResultMax()
const
226 return nextResultMaxEdge;
229 bool isResultMaxLinked()
const
231 return nextResultMaxEdge !=
nullptr;
234 bool isVisited()
const
239 void markVisitedBoth()
242 symOE()->markVisited();
245 void setEdgeRing(
const OverlayEdgeRing* p_edgeRing)
247 edgeRing = p_edgeRing;
250 const OverlayEdgeRing* getEdgeRing()
const
255 const MaximalEdgeRing* getEdgeRingMax()
const
260 void setEdgeRingMax(
const MaximalEdgeRing* p_maximalEdgeRing)
262 maxEdgeRing = p_maximalEdgeRing;
265 friend std::ostream& operator<<(std::ostream& os,
const OverlayEdge& oe);
266 std::string resultSymbol()
const;