Class GeometryUtils

java.lang.Object
de.hybris.platform.storelocator.impl.GeometryUtils

public class GeometryUtils extends Object
Utility class responsible for getting elliptical distances
  • Field Details

    • KRASSOWSKI

      public static final org.gavaghan.geodesy.Ellipsoid KRASSOWSKI
      the Krassowski ellipsoid is no longer available as part of geodesy (this constant is copied from the geodesy 1.0.0 release)
    • LAT_DEGREE_DIST

      public static final double LAT_DEGREE_DIST
      Meridian length = 20000km Angular length = 180 degree distance of one degree = 111.11
      See Also:
    • APP_EARTH_RADIUS

      public static final double APP_EARTH_RADIUS
      Approximate earth radius [kilometers]
      See Also:
  • Method Details

    • getElipticalDistanceKM

      public static double getElipticalDistanceKM(GPS gpsFrom, GPS gpsTo)
      Returns Elliptical distance between two gps coordinates
      Parameters:
      gpsFrom -
      gpsTo -
      Returns:
      double
    • igps2GlobalCoordinates

      protected static org.gavaghan.geodesy.GlobalCoordinates igps2GlobalCoordinates(GPS igps)
    • getCircleOfLatitudeLength

      protected static double getCircleOfLatitudeLength(double latitude)
    • getSquareOfTolerance

      public static List<GPS> getSquareOfTolerance(GPS center, double radius)
      returns list of coordinates locations being the top-left and bottom-right corners of the tolerance square
      Parameters:
      center - GPS
      radius - [kilometers]
      Returns:
      list of GPS
      Throws:
      GeoLocatorException
    • fixOverlappedLongitude

      protected static double fixOverlappedLongitude(double longitude)
    • fixOverlappedLatitude

      protected static double fixOverlappedLatitude(double latitude)
    • isPointInEurope

      public static boolean isPointInEurope(GPS point)