Package org.locationtech.jts.geomgraph
Class GraphComponent
java.lang.Object
org.locationtech.jts.geomgraph.GraphComponent
A GraphComponent is the parent class for the objects'
that form a graph. Each GraphComponent can carry a
Label.
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
isInResult indicates if this component has already been included in the resultprivate boolean
protected Label
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
compute the contribution to an IM for this componentabstract Coordinate
getLabel()
boolean
boolean
boolean
abstract boolean
An isolated component is one that does not intersect or touch any other component.boolean
void
setCovered
(boolean isCovered) void
setInResult
(boolean isInResult) void
void
setVisited
(boolean isVisited) void
Update the IM with the contribution for this component.
-
Field Details
-
label
-
isInResult
private boolean isInResultisInResult indicates if this component has already been included in the result -
isCovered
private boolean isCovered -
isCoveredSet
private boolean isCoveredSet -
isVisited
private boolean isVisited
-
-
Constructor Details
-
GraphComponent
public GraphComponent() -
GraphComponent
-
-
Method Details
-
getLabel
-
setLabel
-
setInResult
public void setInResult(boolean isInResult) -
isInResult
public boolean isInResult() -
setCovered
public void setCovered(boolean isCovered) -
isCovered
public boolean isCovered() -
isCoveredSet
public boolean isCoveredSet() -
isVisited
public boolean isVisited() -
setVisited
public void setVisited(boolean isVisited) -
getCoordinate
- Returns:
- a coordinate in this component (or null, if there are none)
-
computeIM
compute the contribution to an IM for this component -
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
-
updateIM
Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries
-