Class GreatCirclePointDistance

java.lang.Object
org.apache.jena.geosparql.implementation.great_circle.GreatCirclePointDistance

public class GreatCirclePointDistance extends Object
Determines final Latitude and Longitude based on a bearing.
Constant values are calculated once to avoid repetition.
Latitude and longitude calculated in stages to avoid unnecessary calculations.
  • Constructor Details

    • GreatCirclePointDistance

      public GreatCirclePointDistance(double startLat, double startLon, double distance)
  • Method Details

    • getDistance

      public double getDistance()
    • getAngDistance

      public double getAngDistance()
    • getStartLat

      public double getStartLat()
    • getStartLon

      public double getStartLon()
    • getLatRad

      public double getLatRad()
    • getLonRad

      public double getLonRad()
    • getSinStartLat

      public double getSinStartLat()
    • getCosStartLat

      public double getCosStartLat()
    • getSinAngDistance

      public double getSinAngDistance()
    • getCosAngDistance

      public double getCosAngDistance()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • latitude

      public double latitude(double bearingRad)
    • longitude

      public double longitude(double endLatRad, double bearingRad)
    • radToPoint

      public static final LatLonPoint radToPoint(double latRad, double lonRad)
      Convert Lat/Lon in radians to Point in degrees.
      Longitude normalised between -180 and 180.
      Parameters:
      latRad -
      lonRad -
      Returns:
      Lat/Lon Point in degrees.
    • radToPoint

      public static final LatLonPoint radToPoint(double latRad, double lonRad, boolean isNormaliseLon)
      Convert Lat/Lon in radians to Point in degrees.
      Parameters:
      latRad -
      lonRad -
      isNormaliseLon - Normalise Longitude between -180 and 180.
      Returns:
      Lat/Lon Point in degrees.
    • normaliseLongitude

      public static double normaliseLongitude(double lonDegrees)
      Normalise Longitude in degrees to the range -180 to 180.
      Parameters:
      lonDegrees -
      Returns:
      Lat/Lon Point in degrees.
    • getPoint

      public static final LatLonPoint getPoint(LatLonPoint startPoint, double distance, double bearing)
      Lat/Lon Point from start Lat/Lon Point following bearing degrees (clockwise from north) and distance (metres).
      Parameters:
      startPoint -
      distance -
      bearing -
      Returns:
      Lat/Lon point in the distance and bearing from start point.
    • getPoint

      public static final LatLonPoint getPoint(double startLat, double startLon, double distance, double bearing)
      Lat/Lon Point from start Lat/x,Lon/y following bearing degrees (clockwise from north) and distance (metres).
      Parameters:
      startLat -
      startLon -
      distance -
      bearing -
      Returns:
      Lat/Lon point in the distance and bearing from start point.