Class DistanceUtils


  • @Deprecated
    public final class DistanceUtils
    extends Object
    Deprecated.
    Replaced by Geodetic­Calculator. See SIS-385.
    Class to calculate distances on earth surface. Actual calculation code very similar to Apache SIS but refractor to allow use of custom classes.
    • Field Detail

      • HALF_EARTH_CIRCUMFERENCE

        public static final double HALF_EARTH_CIRCUMFERENCE
        Deprecated.
        See Also:
        Constant Field Values
    • Method Detail

      • getPointOnGreatCircle

        @Deprecated
        public static DirectPosition2D getPointOnGreatCircle​(double latitude,
                                                             double longitude,
                                                             double d,
                                                             double bearing)
        Returns a coordinate on the great circle at the specified bearing.
        Parameters:
        latitude - the latitude of center of circle
        longitude - the longitude of center of circle
        d - the distance from the center
        bearing - the great circle bearing
        Returns:
        a coordinate at the specified bearing
      • getHaversineDistance

        @Deprecated
        public static double getHaversineDistance​(double latitude1,
                                                  double longitude1,
                                                  double latitude2,
                                                  double longitude2)
        Calculates haversine (great circle) distance between two lat/lon coordinates.
        Parameters:
        latitude1 - latitude of first coordinate
        longitude1 - longitude of first coordinate
        latitude2 - latitude of second coordinate
        longitude2 - longitude of second coordinate
        Returns:
        great circle distance between specified lat/lon coordinates