Package org.locationtech.jts.geomgraph
Class DirectedEdgeStar
java.lang.Object
org.locationtech.jts.geomgraph.EdgeEndStar
org.locationtech.jts.geomgraph.DirectedEdgeStar
A DirectedEdgeStar is an ordered list of outgoing DirectedEdges around a node.
It supports labelling the edges as well as linking the edges to form both
MaximalEdgeRings and MinimalEdgeRings.
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Labelprivate final intprivate ListA list of all outgoing edges in the result, in CCW orderprivate final intFields inherited from class org.locationtech.jts.geomgraph.EdgeEndStar
edgeList, edgeMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intcomputeDepths(int startIndex, int endIndex, int startDepth) Compute the DirectedEdge depths for a subsequence of the edge array.voidvoidcomputeLabelling(GeometryGraph[] geom) Compute the labelling for all dirEdges in this star, as well as the overall labellingvoidTraverse the star of edges, maintaining the current location in the result area at this node (if any).getLabel()intintprivate ListvoidInsert a directed edge in the listvoidvoidvoidTraverse the star of DirectedEdges, linking the included edges together.voidFor each dirEdge in the star, merge the label from the sym dirEdge into the labelvoidprint(PrintStream out) voidupdateLabelling(Label nodeLabel) Update incomplete dirEdge labels from the labelling for the nodeMethods inherited from class org.locationtech.jts.geomgraph.EdgeEndStar
findIndex, getCoordinate, getDegree, getEdges, getNextCW, insertEdgeEnd, isAreaLabelsConsistent, iterator, propagateSideLabels, toString
-
Field Details
-
resultAreaEdgeList
A list of all outgoing edges in the result, in CCW order -
label
-
SCANNING_FOR_INCOMING
private final int SCANNING_FOR_INCOMING- See Also:
-
LINKING_TO_OUTGOING
private final int LINKING_TO_OUTGOING- See Also:
-
-
Constructor Details
-
DirectedEdgeStar
public DirectedEdgeStar()
-
-
Method Details
-
insert
Insert a directed edge in the list- Specified by:
insertin classEdgeEndStar
-
getLabel
-
getOutgoingDegree
public int getOutgoingDegree() -
getOutgoingDegree
-
getRightmostEdge
-
computeLabelling
Compute the labelling for all dirEdges in this star, as well as the overall labelling- Overrides:
computeLabellingin classEdgeEndStar
-
mergeSymLabels
public void mergeSymLabels()For each dirEdge in the star, merge the label from the sym dirEdge into the label -
updateLabelling
Update incomplete dirEdge labels from the labelling for the node -
getResultAreaEdges
-
linkResultDirectedEdges
public void linkResultDirectedEdges()Traverse the star of DirectedEdges, linking the included edges together. To link two dirEdges, thenextpointer for an incoming dirEdge is set to the next outgoing edge.DirEdges are only linked if:
- they belong to an area (i.e. they have sides)
- they are marked as being in the result
Edges are linked in CCW order (the order they are stored). This means that rings have their face on the Right (in other words, the topological location of the face is given by the RHS label of the DirectedEdge)
PRECONDITION: No pair of dirEdges are both marked as being in the result
-
linkMinimalDirectedEdges
-
linkAllDirectedEdges
public void linkAllDirectedEdges() -
findCoveredLineEdges
public void findCoveredLineEdges()Traverse the star of edges, maintaining the current location in the result area at this node (if any). If any L edges are found in the interior of the result, mark them as covered. -
computeDepths
-
computeDepths
private int computeDepths(int startIndex, int endIndex, int startDepth) Compute the DirectedEdge depths for a subsequence of the edge array.- Returns:
- the last depth assigned (from the R side of the last edge visited)
-
print
- Overrides:
printin classEdgeEndStar
-