Class EdgeEndBundle

java.lang.Object
org.locationtech.jts.geomgraph.EdgeEnd
org.locationtech.jts.operation.relate.EdgeEndBundle
All Implemented Interfaces:
Comparable

public class EdgeEndBundle extends EdgeEnd
A collection of EdgeEnds which obey the following invariant: They originate at the same node and have the same direction.
Version:
1.7
  • Field Details

    • edgeEnds

      private List edgeEnds
  • Constructor Details

  • Method Details

    • getLabel

      public Label getLabel()
      Overrides:
      getLabel in class EdgeEnd
    • iterator

      public Iterator iterator()
    • getEdgeEnds

      public List getEdgeEnds()
    • insert

      public void insert(EdgeEnd e)
    • computeLabel

      public void computeLabel(BoundaryNodeRule boundaryNodeRule)
      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 class EdgeEnd
    • computeLabelOn

      private void computeLabelOn(int geomIndex, BoundaryNodeRule boundaryNodeRule)
      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 a BoundaryNodeRule 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

      void updateIM(IntersectionMatrix im)
      Update the IM with the contribution for the computed label for the EdgeStubs.
    • print

      public void print(PrintStream out)
      Overrides:
      print in class EdgeEnd