com.vividsolutions.jts.geomgraph

Class GraphComponent

Known Direct Subclasses:
Edge, Node

public abstract class GraphComponent
extends java.lang.Object

A GraphComponent is the parent class for the objects' that form a graph. Each GraphComponent can carry a Label.
Version:
1.6

Field Summary

protected Label
label

Constructor Summary

GraphComponent()
GraphComponent(Label label)

Method Summary

protected abstract void
computeIM(IntersectionMatrix im)
compute the contribution to an IM for this component
abstract Coordinate
getCoordinate()
Label
getLabel()
boolean
isCovered()
boolean
isCoveredSet()
boolean
isInResult()
abstract boolean
isIsolated()
An isolated component is one that does not intersect or touch any other component.
boolean
isVisited()
void
setCovered(boolean isCovered)
void
setInResult(boolean isInResult)
void
setLabel(Label label)
void
setVisited(boolean isVisited)
void
updateIM(IntersectionMatrix im)
Update the IM with the contribution for this component.

Field Details

label

protected Label label

Constructor Details

GraphComponent

public GraphComponent()

GraphComponent

public GraphComponent(Label label)

Method Details

computeIM

protected abstract void computeIM(IntersectionMatrix im)
compute the contribution to an IM for this component

getCoordinate

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

getLabel

public Label getLabel()

isCovered

public boolean isCovered()

isCoveredSet

public boolean isCoveredSet()

isInResult

public boolean isInResult()

isIsolated

public abstract 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.
Returns:
true if this component is isolated

isVisited

public boolean isVisited()

setCovered

public void setCovered(boolean isCovered)

setInResult

public void setInResult(boolean isInResult)

setLabel

public void setLabel(Label label)

setVisited

public void setVisited(boolean isVisited)

updateIM

public void updateIM(IntersectionMatrix im)
Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries