Interface DistanceCalculator

    • Method Detail

      • distance

        double distance​(Point from,
                        Point to)
        The distance between from and to.
      • distance

        double distance​(Point from,
                        double toX,
                        double toY)
        The distance between from and Point(toX,toY).
      • within

        boolean within​(Point from,
                       double toX,
                       double toY,
                       double distance)
        Returns true if the distance between from and to is <= distance.
      • pointOnBearing

        Point pointOnBearing​(Point from,
                             double distDEG,
                             double bearingDEG,
                             SpatialContext ctx,
                             Point reuse)
        Calculates where a destination point is given an origin (from) distance, and bearing (given in degrees -- 0-360). If reuse is given, then this method may reset() it and return it.
      • calcBoxByDistFromPt

        Rectangle calcBoxByDistFromPt​(Point from,
                                      double distDEG,
                                      SpatialContext ctx,
                                      Rectangle reuse)
        Calculates the bounding box of a circle, as specified by its center point and distance.
      • calcBoxByDistFromPt_yHorizAxisDEG

        double calcBoxByDistFromPt_yHorizAxisDEG​(Point from,
                                                 double distDEG,
                                                 SpatialContext ctx)
        The Y coordinate of the horizontal axis of a circle that has maximum width. On a 2D plane, this result is always from.getY() but, perhaps surprisingly, on a sphere it is going to be slightly different.
      • area

        double area​(Circle circle)