public class Edge extends GraphComponent
Constructor and Description |
---|
Edge(Coordinate[] pts) |
Edge(Coordinate[] pts,
Label label) |
Modifier and Type | Method and Description |
---|---|
void |
addIntersection(LineIntersector li,
int segmentIndex,
int geomIndex,
int intIndex)
Add an EdgeIntersection for intersection intIndex.
|
void |
addIntersections(LineIntersector li,
int segmentIndex,
int geomIndex)
Adds EdgeIntersections for one or both
intersections found for a segment of an edge to the edge intersection list.
|
void |
computeIM(IntersectionMatrix im)
Update the IM with the contribution for this component.
|
boolean |
equals(Object o)
equals is defined to be:
|
Edge |
getCollapsedEdge() |
Coordinate |
getCoordinate() |
Coordinate |
getCoordinate(int i) |
Coordinate[] |
getCoordinates() |
Depth |
getDepth() |
int |
getDepthDelta()
The depthDelta is the change in depth as an edge is crossed from R to L
|
EdgeIntersectionList |
getEdgeIntersectionList() |
Envelope |
getEnvelope() |
int |
getMaximumSegmentIndex() |
MonotoneChainEdge |
getMonotoneChainEdge() |
int |
getNumPoints() |
int |
hashCode() |
boolean |
isClosed() |
boolean |
isCollapsed()
An Edge is collapsed if it is an Area edge and it consists of
two segments which are equal and opposite (eg a zero-width V).
|
boolean |
isIsolated()
An isolated component is one that does not intersect or touch any other
component.
|
boolean |
isPointwiseEqual(Edge e)
Check if coordinate sequences of the Edges are identical.
|
void |
print(PrintStream out) |
void |
printReverse(PrintStream out) |
void |
setDepthDelta(int depthDelta) |
void |
setIsolated(boolean isIsolated) |
void |
setName(String name) |
String |
toString() |
static void |
updateIM(Label label,
IntersectionMatrix im)
Updates an IM from the label for an edge.
|
getLabel, isCovered, isCoveredSet, isInResult, isVisited, setCovered, setInResult, setLabel, setVisited, updateIM
public Edge(Coordinate[] pts, Label label)
public Edge(Coordinate[] pts)
public static void updateIM(Label label, IntersectionMatrix im)
label
- Label defining positionim
- intersection matrixpublic int getNumPoints()
public void setName(String name)
public Coordinate[] getCoordinates()
public Coordinate getCoordinate(int i)
public Coordinate getCoordinate()
getCoordinate
in class GraphComponent
public Envelope getEnvelope()
public Depth getDepth()
public int getDepthDelta()
public void setDepthDelta(int depthDelta)
public int getMaximumSegmentIndex()
public EdgeIntersectionList getEdgeIntersectionList()
public MonotoneChainEdge getMonotoneChainEdge()
public boolean isClosed()
public boolean isCollapsed()
public Edge getCollapsedEdge()
public void setIsolated(boolean isIsolated)
public boolean isIsolated()
GraphComponent
isIsolated
in class GraphComponent
public void addIntersections(LineIntersector li, int segmentIndex, int geomIndex)
li
- Determining number of intersections to addsegmentIndex
- Segment index to addgeomIndex
- Geometry index to addpublic void addIntersection(LineIntersector li, int segmentIndex, int geomIndex, int intIndex)
li
- Determining number of intersections to addsegmentIndex
- Segment index to addgeomIndex
- Geometry index to addintIndex
- intIndex is 0 or 1public void computeIM(IntersectionMatrix im)
im
- Intersection matrixpublic boolean equals(Object o)
e1 equals e2 iff the coordinates of e1 are the same or the reverse of the coordinates in e2
public boolean isPointwiseEqual(Edge e)
e
- Edgepublic void print(PrintStream out)
public void printReverse(PrintStream out)
Copyright © 2024. All rights reserved.