Class InfBufLine

java.lang.Object
org.locationtech.spatial4j.shape.impl.InfBufLine

public class InfBufLine extends Object
INERNAL: A buffered line of infinite length. Public for test access.
  • Field Details

    • EPS

      private static final double EPS
      Error epsilon.
      See Also:
    • slope

      private final double slope
    • intercept

      private final double intercept
    • buf

      private final double buf
    • distDenomInv

      private final double distDenomInv
    • oppositeQuad

      private static final int[] oppositeQuad
  • Constructor Details

    • InfBufLine

      InfBufLine(double slope, Point point, double buf)
  • Method Details

    • relate

      SpatialRelation relate(Rectangle r, Point prC, Point scratch)
    • contains

      boolean contains(Point p)
    • distanceUnbuffered

      public double distanceUnbuffered(Point c)
      INTERNAL AKA lineToPointDistance
    • quadrant

      public int quadrant(Point c)
      INTERNAL: AKA lineToPointQuadrant
    • cornerByQuadrant

      public static void cornerByQuadrant(Rectangle r, int cornerQuad, Point out)
    • getSlope

      public double getSlope()
    • getIntercept

      public double getIntercept()
    • getBuf

      public double getBuf()
    • getDistDenomInv

      public double getDistDenomInv()
      1 / Math.sqrt(slope * slope + 1)
    • toString

      public String toString()
      Overrides:
      toString in class Object