Class EdgeEndBundle
java.lang.Object
org.locationtech.jts.geomgraph.EdgeEnd
org.locationtech.jts.operation.relate.EdgeEndBundle
- All Implemented Interfaces:
Comparable
A collection of
EdgeEnd
s which obey the following invariant:
They originate at the same node and have the same direction.- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeLabel
(BoundaryNodeRule boundaryNodeRule) This computes the overall edge label for the set of edges in this EdgeStubBundle.private void
computeLabelOn
(int geomIndex, BoundaryNodeRule boundaryNodeRule) Compute the overall ON location for the list of EdgeStubs.private void
computeLabelSide
(int geomIndex, int side) To compute the summary label for a side, the algorithm is: FOR all edges IF any edge's location is INTERIOR for the side, side location = INTERIOR ELSE IF there is at least one EXTERIOR attribute, side location = EXTERIOR ELSE side location = NULL
Note that it is possible for two sides to have apparently contradictory information i.e.private void
computeLabelSides
(int geomIndex) Compute the labelling for each sidegetLabel()
void
iterator()
void
print
(PrintStream out) (package private) void
Update the IM with the contribution for the computed label for the EdgeStubs.Methods inherited from class org.locationtech.jts.geomgraph.EdgeEnd
compareDirection, compareTo, getCoordinate, getDirectedCoordinate, getDx, getDy, getEdge, getNode, getQuadrant, init, setNode, toString
-
Field Details
-
edgeEnds
-
-
Constructor Details
-
EdgeEndBundle
-
EdgeEndBundle
-
-
Method Details
-
getLabel
-
iterator
-
getEdgeEnds
-
insert
-
computeLabel
This computes the overall edge label for the set of edges in this EdgeStubBundle. It essentially merges the ON and side labels for each edge. These labels must be compatible- Overrides:
computeLabel
in classEdgeEnd
-
computeLabelOn
Compute the overall ON location for the list of EdgeStubs. (This is essentially equivalent to computing the self-overlay of a single Geometry) edgeStubs can be either on the boundary (e.g. Polygon edge) OR in the interior (e.g. segment of a LineString) of their parent Geometry. In addition, GeometryCollections use aBoundaryNodeRule
to determine whether a segment is on the boundary or not. Finally, in GeometryCollections it can occur that an edge is both on the boundary and in the interior (e.g. a LineString segment lying on top of a Polygon edge.) In this case the Boundary is given precedence.
These observations result in the following rules for computing the ON location:- if there are an odd number of Bdy edges, the attribute is Bdy
- if there are an even number >= 2 of Bdy edges, the attribute is Int
- if there are any Int edges, the attribute is Int
- otherwise, the attribute is NULL.
-
computeLabelSides
private void computeLabelSides(int geomIndex) Compute the labelling for each side -
computeLabelSide
private void computeLabelSide(int geomIndex, int side) To compute the summary label for a side, the algorithm is: FOR all edges IF any edge's location is INTERIOR for the side, side location = INTERIOR ELSE IF there is at least one EXTERIOR attribute, side location = EXTERIOR ELSE side location = NULL
Note that it is possible for two sides to have apparently contradictory information i.e. one edge side may indicate that it is in the interior of a geometry, while another edge side may indicate the exterior of the same geometry. This is not an incompatibility - GeometryCollections may contain two Polygons that touch along an edge. This is the reason for Interior-primacy rule above - it results in the summary label having the Geometry interior on both sides. -
updateIM
Update the IM with the contribution for the computed label for the EdgeStubs. -
print
-