Class EdgeIntersectionList


  • public class EdgeIntersectionList
    extends java.lang.Object
    A list of edge intersections along an Edge. Implements splitting an edge with intersections into multiple resultant edges.
    Version:
    1.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Edge edge  
      private java.util.Map nodeMap  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EdgeIntersection add​(Coordinate intPt, int segmentIndex, double dist)
      Adds an intersection into the list, if it isn't already there.
      void addEndpoints()
      Adds entries for the first and last points of the edge to the list
      void addSplitEdges​(java.util.List edgeList)
      Creates new edges for all the edges that the intersections in this list split the parent edge into.
      (package private) Edge createSplitEdge​(EdgeIntersection ei0, EdgeIntersection ei1)
      Create a new "split edge" with the section of points between (and including) the two intersections.
      boolean isIntersection​(Coordinate pt)
      Tests if the given point is an edge intersection
      java.util.Iterator iterator()
      Returns an iterator of EdgeIntersections
      void print​(java.io.PrintStream out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • nodeMap

        private java.util.Map nodeMap
    • Constructor Detail

      • EdgeIntersectionList

        public EdgeIntersectionList​(Edge edge)
    • Method Detail

      • add

        public EdgeIntersection add​(Coordinate intPt,
                                    int segmentIndex,
                                    double dist)
        Adds an intersection into the list, if it isn't already there. The input segmentIndex and dist are expected to be normalized.
        Returns:
        the EdgeIntersection found or added
      • iterator

        public java.util.Iterator iterator()
        Returns an iterator of EdgeIntersections
        Returns:
        an Iterator of EdgeIntersections
      • isIntersection

        public boolean isIntersection​(Coordinate pt)
        Tests if the given point is an edge intersection
        Parameters:
        pt - the point to test
        Returns:
        true if the point is an intersection
      • addEndpoints

        public void addEndpoints()
        Adds entries for the first and last points of the edge to the list
      • addSplitEdges

        public void addSplitEdges​(java.util.List edgeList)
        Creates new edges for all the edges that the intersections in this list split the parent edge into. Adds the edges to the input list (this is so a single list can be used to accumulate all split edges for a Geometry).
        Parameters:
        edgeList - a list of EdgeIntersections
      • createSplitEdge

        Edge createSplitEdge​(EdgeIntersection ei0,
                             EdgeIntersection ei1)
        Create a new "split edge" with the section of points between (and including) the two intersections. The label for the new edge is the same as the label for the parent edge.
      • print

        public void print​(java.io.PrintStream out)