Package org.locationtech.jts.geomgraph
Class DirectedEdge
java.lang.Object
org.locationtech.jts.geomgraph.EdgeEnd
org.locationtech.jts.geomgraph.DirectedEdge
- All Implemented Interfaces:
Comparable
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]
The depth of each side (position) of this edge.private EdgeRing
protected boolean
private boolean
private boolean
private EdgeRing
private DirectedEdge
private DirectedEdge
private DirectedEdge
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Compute the label in the appropriate orientation for this DirEdgestatic int
depthFactor
(int currLocation, int nextLocation) Computes the factor for the change in depth when moving from one location to another.int
getDepth
(int position) int
getEdge()
getNext()
getSym()
Each Edge gives rise to a pair of symmetric DirectedEdges, in opposite directions.boolean
boolean
boolean
This is an interior Area edge if its label is an Area label for both Geometries and for each Geometry both sides are in the interior.boolean
This edge is a line edge if at least one of the labels is a line label any labels which are not line labels have all Locations = EXTERIORboolean
void
print
(PrintStream out) void
printEdge
(PrintStream out) void
setDepth
(int position, int depthVal) void
setEdgeDepths
(int position, int depth) Set both edge depths.void
setEdgeRing
(EdgeRing edgeRing) void
setInResult
(boolean isInResult) void
setMinEdgeRing
(EdgeRing minEdgeRing) void
setNext
(DirectedEdge next) void
setNextMin
(DirectedEdge nextMin) void
setSym
(DirectedEdge de) void
setVisited
(boolean isVisited) void
setVisitedEdge
(boolean isVisited) setVisitedEdge marks both DirectedEdges attached to a given Edge.Methods inherited from class org.locationtech.jts.geomgraph.EdgeEnd
compareDirection, compareTo, computeLabel, getCoordinate, getDirectedCoordinate, getDx, getDy, getLabel, getNode, getQuadrant, init, setNode, toString
-
Field Details
-
isForward
protected boolean isForward -
isInResult
private boolean isInResult -
isVisited
private boolean isVisited -
sym
-
next
-
nextMin
-
edgeRing
-
minEdgeRing
-
depth
private int[] depthThe depth of each side (position) of this edge. The 0 element of the array is never used.
-
-
Constructor Details
-
DirectedEdge
-
-
Method Details
-
depthFactor
public static int depthFactor(int currLocation, int nextLocation) Computes the factor for the change in depth when moving from one location to another. E.g. if crossing from the INTERIOR to the EXTERIOR the depth decreases, so the factor is -1 -
getEdge
-
setInResult
public void setInResult(boolean isInResult) -
isInResult
public boolean isInResult() -
isVisited
public boolean isVisited() -
setVisited
public void setVisited(boolean isVisited) -
setEdgeRing
-
getEdgeRing
-
setMinEdgeRing
-
getMinEdgeRing
-
getDepth
public int getDepth(int position) -
setDepth
public void setDepth(int position, int depthVal) -
getDepthDelta
public int getDepthDelta() -
setVisitedEdge
public void setVisitedEdge(boolean isVisited) setVisitedEdge marks both DirectedEdges attached to a given Edge. This is used for edges corresponding to lines, which will only appear oriented in a single direction in the result. -
getSym
Each Edge gives rise to a pair of symmetric DirectedEdges, in opposite directions.- Returns:
- the DirectedEdge for the same Edge but in the opposite direction
-
isForward
public boolean isForward() -
setSym
-
getNext
-
setNext
-
getNextMin
-
setNextMin
-
isLineEdge
public boolean isLineEdge()This edge is a line edge if- at least one of the labels is a line label
- any labels which are not line labels have all Locations = EXTERIOR
-
isInteriorAreaEdge
public boolean isInteriorAreaEdge()This is an interior Area edge if- its label is an Area label for both Geometries
- and for each Geometry both sides are in the interior.
- Returns:
- true if this is an interior Area edge
-
computeDirectedLabel
private void computeDirectedLabel()Compute the label in the appropriate orientation for this DirEdge -
setEdgeDepths
public void setEdgeDepths(int position, int depth) Set both edge depths. One depth for a given side is provided. The other is computed depending on the Location transition and the depthDelta of the edge. -
print
-
printEdge
-