Class OrthodromicDistance


  • public class OrthodromicDistance
    extends Object
    Author:
    Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
    • Field Detail

      • R

        public static double R
    • Constructor Detail

      • OrthodromicDistance

        public OrthodromicDistance()
    • Method Detail

      • getDistanceInDegrees

        public static double getDistanceInDegrees​(Point x,
                                                  Point y)
        Computes and returns distance between two points.
        Parameters:
        x - , first point
        y - , second point
        Returns:
        the distance between x and y
      • getDistanceInDegrees

        public static double getDistanceInDegrees​(double lat1,
                                                  double long1,
                                                  double lat2,
                                                  double long2)
        Computes the distance between two points on earth Input latitudes/longitudes by converting their latitude and longitude into radians.
        Parameters:
        lat1 - , Latitude of first point
        long1 - , Longitude of first point
        lat2 - , Latitude of second point
        long2 - , Longitude of second point
        Returns:
        Distance between both points
      • getDistance

        public static double getDistance​(double lat1,
                                         double long1,
                                         double lat2,
                                         double long2)
        Computes the distance between two points on earth Input latitudes/longitudes are in Radians
        Parameters:
        lat1 - , Latitude of first point
        long1 - , Longitude of first point
        lat2 - , Latitude of second point
        long2 - , Longitude of second point
        Returns:
        Distance between both points