Class LineBuilder


  • public class LineBuilder
    extends java.lang.Object
    Forms JTS LineStrings out of a the graph of DirectedEdges created by an OverlayOp.
    Version:
    1.7
    • Field Detail

      • lineEdgesList

        private java.util.List lineEdgesList
      • resultLineList

        private java.util.List resultLineList
    • Method Detail

      • build

        public java.util.List build​(int opCode)
        Returns:
        a list of the LineStrings in the result of the specified overlay operation
      • findCoveredLineEdges

        private void findCoveredLineEdges()
        Find and mark L edges which are "covered" by the result area (if any). L edges at nodes which also have A edges can be checked by checking their depth at that node. L edges at nodes which do not have A edges can be checked by doing a point-in-polygon test with the previously computed result areas.
      • collectLines

        private void collectLines​(int opCode)
      • collectLineEdge

        private void collectLineEdge​(DirectedEdge de,
                                     int opCode,
                                     java.util.List edges)
        Collect line edges which are in the result. Line edges are in the result if they are not part of an area boundary, if they are in the result of the overlay operation, and if they are not covered by a result area.
        Parameters:
        de - the directed edge to test
        opCode - the overlap operation
        edges - the list of included line edges
      • collectBoundaryTouchEdge

        private void collectBoundaryTouchEdge​(DirectedEdge de,
                                              int opCode,
                                              java.util.List edges)
        Collect edges from Area inputs which should be in the result but which have not been included in a result area. This happens ONLY:
        • during an intersection when the boundaries of two areas touch in a line segment
        • OR as a result of a dimensional collapse.
      • buildLines

        private void buildLines​(int opCode)
      • labelIsolatedLines

        private void labelIsolatedLines​(java.util.List edgesList)
      • labelIsolatedLine

        private void labelIsolatedLine​(Edge e,
                                       int targetIndex)
        Label an isolated node with its relationship to the target geometry.