com.vividsolutions.jts.geomgraph

Class Edge


public class Edge
extends GraphComponent

Version:
1.6

Field Summary

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

label

Constructor Summary

Edge(Coordinate[] pts)
Edge(Coordinate[] pts, Label label)

Method Summary

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:

e1 equals e2 iff the coordinates of e1 are the same or the reverse of the coordinates in e2

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()
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()
boolean
isPointwiseEqual(Edge e)
void
print(PrintStream out)
void
printReverse(PrintStream out)
void
setDepthDelta(int depthDelta)
void
setIsolated(boolean isIsolated)
void
setName(String name)
static void
updateIM(Label label, IntersectionMatrix im)
Updates an IM from the label for an edge.

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

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

Constructor Details

Edge

public Edge(Coordinate[] pts)

Edge

public Edge(Coordinate[] pts,
            Label label)

Method Details

addIntersection

public void addIntersection(LineIntersector li,
                            int segmentIndex,
                            int geomIndex,
                            int intIndex)
Add an EdgeIntersection for intersection intIndex. An intersection that falls exactly on a vertex of the edge is normalized to use the higher of the two possible segmentIndexes

addIntersections

public 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.

computeIM

public void computeIM(IntersectionMatrix im)
Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries
Overrides:
computeIM in interface GraphComponent

equals

public boolean equals(Object o)
equals is defined to be:

e1 equals e2 iff the coordinates of e1 are the same or the reverse of the coordinates in e2


getCollapsedEdge

public Edge getCollapsedEdge()

getCoordinate

public Coordinate getCoordinate()
Overrides:
getCoordinate in interface GraphComponent

getCoordinate

public Coordinate getCoordinate(int i)

getCoordinates

public Coordinate[] getCoordinates()

getDepth

public Depth getDepth()

getDepthDelta

public int getDepthDelta()
The depthDelta is the change in depth as an edge is crossed from R to L
Returns:
the change in depth as the edge is crossed from R to L

getEdgeIntersectionList

public EdgeIntersectionList getEdgeIntersectionList()

getEnvelope

public Envelope getEnvelope()

getMaximumSegmentIndex

public int getMaximumSegmentIndex()

getMonotoneChainEdge

public MonotoneChainEdge getMonotoneChainEdge()

getNumPoints

public int getNumPoints()

isClosed

public boolean isClosed()

isCollapsed

public 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).

isIsolated

public boolean isIsolated()
Overrides:
isIsolated in interface GraphComponent

isPointwiseEqual

public boolean isPointwiseEqual(Edge e)
Returns:
true if the coordinate sequences of the Edges are identical

print

public void print(PrintStream out)

printReverse

public void printReverse(PrintStream out)

setDepthDelta

public void setDepthDelta(int depthDelta)

setIsolated

public void setIsolated(boolean isIsolated)

setName

public void setName(String name)

updateIM

public static void updateIM(Label label,
                            IntersectionMatrix im)
Updates an IM from the label for an edge. Handles edges from both L and A geometries.