Class EdgeTree


  • public class EdgeTree
    extends Object
    Internal tree node: represents geometry edge from lat1,lon1 to lat2,lon2. The sort value is low, which is the minimum latitude of the edge. max stores the maximum latitude of this edge or any children.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean contains​(double x, double y)
      Returns true if the point is on an edge or crosses the edge subtree an odd number of times.
      protected static EdgeTree createTree​(double[] x, double[] y)
      Creates an edge interval tree from a set of geometry vertices.
      protected boolean crossesBox​(double minX, double maxX, double minY, double maxY, boolean includeBoundary)
      Returns true if the box crosses any edge in this edge subtree
      protected boolean crossesLine​(double minX, double maxX, double minY, double maxY, double a2x, double a2y, double b2x, double b2y)
      Returns true if the line crosses any edge in this edge subtree
      protected boolean crossesTriangle​(double minX, double maxX, double minY, double maxY, double ax, double ay, double bx, double by, double cx, double cy, boolean includeBoundary)
      Returns true if the triangle crosses any edge in this edge subtree
      protected boolean isPointOnLine​(double x, double y)
      returns true if the provided x, y point lies on the line
    • Method Detail

      • contains

        protected boolean contains​(double x,
                                   double y)
        Returns true if the point is on an edge or crosses the edge subtree an odd number of times.
      • isPointOnLine

        protected boolean isPointOnLine​(double x,
                                        double y)
        returns true if the provided x, y point lies on the line
      • crossesTriangle

        protected boolean crossesTriangle​(double minX,
                                          double maxX,
                                          double minY,
                                          double maxY,
                                          double ax,
                                          double ay,
                                          double bx,
                                          double by,
                                          double cx,
                                          double cy,
                                          boolean includeBoundary)
        Returns true if the triangle crosses any edge in this edge subtree
      • crossesBox

        protected boolean crossesBox​(double minX,
                                     double maxX,
                                     double minY,
                                     double maxY,
                                     boolean includeBoundary)
        Returns true if the box crosses any edge in this edge subtree
      • crossesLine

        protected boolean crossesLine​(double minX,
                                      double maxX,
                                      double minY,
                                      double maxY,
                                      double a2x,
                                      double a2y,
                                      double b2x,
                                      double b2y)
        Returns true if the line crosses any edge in this edge subtree
      • createTree

        protected static EdgeTree createTree​(double[] x,
                                             double[] y)
        Creates an edge interval tree from a set of geometry vertices.
        Returns:
        root node of the tree.