49 using CoordinateXY = geos::geom::CoordinateXY;
50 using CoordinateXYZM = geos::geom::CoordinateXYZM;
57 std::shared_ptr<const CoordinateSequence> pts;
67 bool m_isInResultArea;
68 bool m_isInResultLine;
71 const OverlayEdgeRing* edgeRing;
72 const MaximalEdgeRing* maxEdgeRing;
83 OverlayEdge(
const CoordinateXYZM& p_orig,
const CoordinateXY& p_dirPt,
85 const std::shared_ptr<const CoordinateSequence>& p_pts,
89 , direction(p_direction)
90 , m_isCurved(isCurved)
93 , m_isInResultArea(
false)
94 , m_isInResultLine(
false)
96 , nextResultEdge(
nullptr)
98 , maxEdgeRing(
nullptr)
99 , nextResultMaxEdge(
nullptr)
104 bool isForward()
const
109 bool isCurved()
const
124 Location getLocation(uint8_t index,
int position)
const
126 return label->
getLocation(index, position, direction);
129 const CoordinateXYZM& getCoordinate()
const
134 const CoordinateSequence* getCoordinatesRO()
const
139 std::shared_ptr<const CoordinateSequence> getCoordinatesOriented()
const;
162 bool isInResultArea()
const
164 return m_isInResultArea;
167 bool isInResultAreaBoth()
const
169 return m_isInResultArea && symOE()->m_isInResultArea;
172 bool isInResultEither()
const
174 return isInResult() || symOE()->isInResult();
177 void unmarkFromResultAreaBoth()
179 m_isInResultArea =
false;
180 symOE()->m_isInResultArea =
false;
183 void markInResultArea()
185 m_isInResultArea =
true;
188 void markInResultAreaBoth()
190 m_isInResultArea =
true;
191 symOE()->m_isInResultArea =
true;
194 bool isInResultLine()
const
196 return m_isInResultLine;
199 void markInResultLine()
201 m_isInResultLine =
true;
202 symOE()->m_isInResultLine =
true;
205 bool isInResult()
const
207 return m_isInResultArea || m_isInResultLine;
210 void setNextResult(OverlayEdge* e)
216 OverlayEdge* nextResult()
const
218 return nextResultEdge;
221 bool isResultLinked()
const
223 return nextResultEdge !=
nullptr;
226 void setNextResultMax(OverlayEdge* e)
229 nextResultMaxEdge = e;
232 OverlayEdge* nextResultMax()
const
234 return nextResultMaxEdge;
237 bool isResultMaxLinked()
const
239 return nextResultMaxEdge !=
nullptr;
242 bool isVisited()
const
247 void markVisitedBoth()
250 symOE()->markVisited();
253 void setEdgeRing(
const OverlayEdgeRing* p_edgeRing)
255 edgeRing = p_edgeRing;
258 const OverlayEdgeRing* getEdgeRing()
const
263 const MaximalEdgeRing* getEdgeRingMax()
const
268 void setEdgeRingMax(
const MaximalEdgeRing* p_maximalEdgeRing)
270 maxEdgeRing = p_maximalEdgeRing;
273 friend std::ostream& operator<<(std::ostream& os,
const OverlayEdge& oe);
274 std::string resultSymbol()
const;