Package com.kosherjava.zmanim.util
Class GeoLocationUtils
java.lang.Object
com.kosherjava.zmanim.util.GeoLocationUtils
Deprecated.
A class for various location calculations
Most of the code in this class is ported from Chris Veness'
LGPL Javascript Implementation
- Author:
- © Eliyahu Hershfeld 2009 - 2022
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
Deprecated.Constant for a distance type calculation.private static int
Deprecated.Constant for a final bearing type calculation.private static int
Deprecated.Constant for a initial bearing type calculation. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
getGeodesicDistance
(GeoLocation location, GeoLocation destination) Deprecated.Calculate geodesic distance in Meters between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.static double
getGeodesicFinalBearing
(GeoLocation location, GeoLocation destination) Deprecated.Calculate the geodesic final bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.static double
getGeodesicInitialBearing
(GeoLocation location, GeoLocation destination) Deprecated.Calculate the geodesic initial bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.static double
getRhumbLineBearing
(GeoLocation location, GeoLocation destination) Deprecated.Returns the rhumb line bearing from the current location to the GeoLocation passed in.static double
getRhumbLineDistance
(GeoLocation location, GeoLocation destination) Deprecated.Returns the rhumb line distance between two GeoLocations passed in.private static double
vincentyFormula
(GeoLocation location, GeoLocation destination, int formula) Deprecated.Calculates the initial geodesic bearing, final bearing or geodesic distance using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.
-
Field Details
-
DISTANCE
Deprecated.Constant for a distance type calculation. -
INITIAL_BEARING
Deprecated.Constant for a initial bearing type calculation. -
FINAL_BEARING
Deprecated.Constant for a final bearing type calculation.
-
-
Constructor Details
-
GeoLocationUtils
public GeoLocationUtils()Deprecated.
-
-
Method Details
-
getGeodesicInitialBearing
Deprecated.Calculate the geodesic initial bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.- Parameters:
location
- the initial locationdestination
- the destination location- Returns:
- the geodesic bearing
-
getGeodesicFinalBearing
Deprecated.Calculate the geodesic final bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.- Parameters:
location
- the initial locationdestination
- the destination location- Returns:
- the geodesic bearing
-
getGeodesicDistance
Deprecated.Calculate geodesic distance in Meters between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975. This uses the WGS-84 geodetic model.- Parameters:
location
- the initial locationdestination
- the destination location- Returns:
- the geodesic distance in Meters
-
vincentyFormula
Deprecated.Calculates the initial geodesic bearing, final bearing or geodesic distance using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.- Parameters:
location
- the initial locationdestination
- the destination locationformula
- This formula calculates initial bearing (INITIAL_BEARING
), final bearing (FINAL_BEARING
) and distance (DISTANCE
).- Returns:
- the geodesic distance, initial or final bearing (based on the formula passed in) between the location and destination in Meters
- See Also:
-
getRhumbLineBearing
Deprecated.Returns the rhumb line bearing from the current location to the GeoLocation passed in.- Parameters:
location
- the initial locationdestination
- the destination location- Returns:
- the bearing in degrees
-
getRhumbLineDistance
Deprecated.Returns the rhumb line distance between two GeoLocations passed in. Ported from Chris Veness' Javascript Implementation.- Parameters:
location
- the initial locationdestination
- the destination location- Returns:
- the distance in Meters
-
GeoLocation
class, and this class that duplicates that code will be removed in release 3.0.