Package org.apache.sis.distance

## Class DistanceUtils

- Object
- - DistanceUtils

-     @Deprecated
      public final class DistanceUtils
      extends Object

  Deprecated.
  Replaced by `GeodeticCalculator`. 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 Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `EARTH_RADIUS` | Deprecated.
    `static double` | `HALF_EARTH_CIRCUMFERENCE` | Deprecated.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static double` | `getHaversineDistance​(double latitude1, double longitude1, double latitude2, double longitude2)` | Deprecated. Replaced by `GeodeticCalculator​.getGeodesicDistance()`.
    `static DirectPosition2D` | `getPointOnGreatCircle​(double latitude, double longitude, double d, double bearing)` | Deprecated. Replaced by `GeodeticCalculator​.getEndPoint()`.

    - ### Methods inherited from class Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EARTH_RADIUS

          public static final int EARTH_RADIUS

      Deprecated.
      See Also:
        Constant Field Values

    - #### 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)

      Deprecated.
      Replaced by `GeodeticCalculator​.getEndPoint()`.
      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)

      Deprecated.
      Replaced by `GeodeticCalculator​.getGeodesicDistance()`.
      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