Package org.locationtech.jts.geomgraph
Class Node
- java.lang.Object
-
- org.locationtech.jts.geomgraph.GraphComponent
-
- org.locationtech.jts.geomgraph.Node
-
- Direct Known Subclasses:
RelateNode
public class Node extends GraphComponent
- Version:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description Node(Coordinate coord, EdgeEndStar edges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(EdgeEnd e)Add the edge to the list of edges at this node.CoordinategetCoordinate()EdgeEndStargetEdges()booleanisIncidentEdgeInResult()Tests whether any incident edge is flagged as being in the result.booleanisIsolated()An isolated component is one that does not intersect or touch any other component.voidmergeLabel(Label label2)To merge labels for two nodes, the merged location for each LabelElement is computed.voidmergeLabel(Node n)voidprint(java.io.PrintStream out)voidsetLabel(int argIndex, int onLocation)voidsetLabelBoundary(int argIndex)Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule.-
Methods inherited from class org.locationtech.jts.geomgraph.GraphComponent
getLabel, isCovered, isCoveredSet, isInResult, isVisited, setCovered, setInResult, setLabel, setVisited, updateIM
-
-
-
-
Constructor Detail
-
Node
public Node(Coordinate coord, EdgeEndStar edges)
-
-
Method Detail
-
getCoordinate
public Coordinate getCoordinate()
- Specified by:
getCoordinatein classGraphComponent- Returns:
- a coordinate in this component (or null, if there are none)
-
getEdges
public EdgeEndStar getEdges()
-
isIncidentEdgeInResult
public boolean isIncidentEdgeInResult()
Tests whether any incident edge is flagged as being in the result. This test can be used to determine if the node is in the result, since if any incident edge is in the result, the node must be in the result as well.- Returns:
trueif any incident edge in the in the result
-
isIsolated
public boolean isIsolated()
Description copied from class:GraphComponentAn isolated component is one that does not intersect or touch any other component. This is the case if the label has valid locations for only a single Geometry.- Specified by:
isIsolatedin classGraphComponent- Returns:
- true if this component is isolated
-
add
public void add(EdgeEnd e)
Add the edge to the list of edges at this node.- Parameters:
e- EdgeEnd
-
mergeLabel
public void mergeLabel(Node n)
-
mergeLabel
public void mergeLabel(Label label2)
To merge labels for two nodes, the merged location for each LabelElement is computed. The location for the corresponding node LabelElement is set to the result, as long as the location is non-null.- Parameters:
label2- Label to merge
-
setLabel
public void setLabel(int argIndex, int onLocation)
-
setLabelBoundary
public void setLabelBoundary(int argIndex)
Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule.- Parameters:
argIndex- location index
-
print
public void print(java.io.PrintStream out)
-
-