public class SegmentNodeList
extends java.lang.Object
SegmentNode
s present along a noded SegmentString
.Modifier and Type | Field and Description |
---|---|
private NodedSegmentString |
edge |
private java.util.Map |
nodeMap |
Constructor and Description |
---|
SegmentNodeList(NodedSegmentString edge) |
Modifier and Type | Method and Description |
---|---|
SegmentNode |
add(Coordinate intPt,
int segmentIndex)
Adds an intersection into the list, if it isn't already there.
|
private void |
addCollapsedNodes()
Adds nodes for any collapsed edge pairs.
|
private void |
addEdgeCoordinates(SegmentNode ei0,
SegmentNode ei1,
CoordinateList coordList) |
private void |
addEndpoints()
Adds nodes for the first and last points of the edge
|
void |
addSplitEdges(java.util.Collection edgeList)
Creates new edges for all the edges that the intersections in this
list split the parent edge into.
|
private void |
checkSplitEdgesCorrectness(java.util.List splitEdges)
Checks the correctness of the set of split edges corresponding to this edge.
|
(package private) SegmentString |
createSplitEdge(SegmentNode ei0,
SegmentNode ei1)
Create a new "split edge" with the section of points between
(and including) the two intersections.
|
private boolean |
findCollapseIndex(SegmentNode ei0,
SegmentNode ei1,
int[] collapsedVertexIndex) |
private void |
findCollapsesFromExistingVertices(java.util.List collapsedVertexIndexes)
Adds nodes for any collapsed edge pairs
which are pre-existing in the vertex list.
|
private void |
findCollapsesFromInsertedNodes(java.util.List collapsedVertexIndexes)
Adds nodes for any collapsed edge pairs caused by inserted nodes
Collapsed edge pairs occur when the same coordinate is inserted as a node
both before and after an existing edge vertex.
|
NodedSegmentString |
getEdge() |
Coordinate[] |
getSplitCoordinates()
Gets the list of coordinates for the fully noded segment string,
including all original segment string vertices and vertices
introduced by nodes in this list.
|
java.util.Iterator |
iterator()
returns an iterator of SegmentNodes
|
void |
print(java.io.PrintStream out) |
private java.util.Map nodeMap
private NodedSegmentString edge
public SegmentNodeList(NodedSegmentString edge)
public NodedSegmentString getEdge()
public SegmentNode add(Coordinate intPt, int segmentIndex)
public java.util.Iterator iterator()
private void addEndpoints()
private void addCollapsedNodes()
private void findCollapsesFromExistingVertices(java.util.List collapsedVertexIndexes)
private void findCollapsesFromInsertedNodes(java.util.List collapsedVertexIndexes)
private boolean findCollapseIndex(SegmentNode ei0, SegmentNode ei1, int[] collapsedVertexIndex)
public void addSplitEdges(java.util.Collection edgeList)
SegmentString
s).private void checkSplitEdgesCorrectness(java.util.List splitEdges)
splitEdges
- the split edges for this edge (in order)SegmentString createSplitEdge(SegmentNode ei0, SegmentNode ei1)
public Coordinate[] getSplitCoordinates()
private void addEdgeCoordinates(SegmentNode ei0, SegmentNode ei1, CoordinateList coordList)
public void print(java.io.PrintStream out)