com.vividsolutions.jts.geomgraph

Class Node

Known Direct Subclasses:
RelateNode

public class Node
extends GraphComponent

Version:
1.6

Field Summary

protected Coordinate
coord
protected EdgeEndStar
edges

Fields inherited from class com.vividsolutions.jts.geomgraph.GraphComponent

label

Constructor Summary

Node(Coordinate coord, EdgeEndStar edges)

Method Summary

void
add(EdgeEnd e)
Add the edge to the list of edges at this node
protected void
computeIM(IntersectionMatrix im)
Basic nodes do not compute IMs
Coordinate
getCoordinate()
EdgeEndStar
getEdges()
boolean
isIsolated()
An isolated component is one that does not intersect or touch any other component.
void
mergeLabel(Label label2)
To merge labels for two nodes, the merged location for each LabelElement is computed.
void
mergeLabel(Node n)
void
print(PrintStream out)
void
setLabel(int argIndex, int onLocation)
void
setLabelBoundary(int argIndex)
Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule.

Methods inherited from class com.vividsolutions.jts.geomgraph.GraphComponent

computeIM, getCoordinate, getLabel, isCovered, isCoveredSet, isInResult, isIsolated, isVisited, setCovered, setInResult, setLabel, setVisited, updateIM

Field Details

coord

protected Coordinate coord

edges

protected EdgeEndStar edges

Constructor Details

Node

public Node(Coordinate coord,
            EdgeEndStar edges)

Method Details

add

public void add(EdgeEnd e)
Add the edge to the list of edges at this node

computeIM

protected void computeIM(IntersectionMatrix im)
Basic nodes do not compute IMs
Overrides:
computeIM in interface GraphComponent

getCoordinate

public Coordinate getCoordinate()
Overrides:
getCoordinate in interface GraphComponent
Returns:
a coordinate in this component (or null, if there are none)

getEdges

public EdgeEndStar getEdges()

isIsolated

public boolean isIsolated()
An 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.
Overrides:
isIsolated in interface GraphComponent
Returns:
true if this component is isolated

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.

mergeLabel

public void mergeLabel(Node n)

print

public void print(PrintStream out)

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.