Package locus.api.utils
Class LocationCompute
-
- All Implemented Interfaces:
public final class LocationCompute
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classLocationCompute.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static DoubleAVERAGE_RADIUS_OF_EARTHpublic final static LocationCompute.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description LocationCompute(Location loc)
-
Method Summary
Modifier and Type Method Description final FloatdistanceTo(Location dest)Returns the approximate distance in meters between this location and the given location. final FloatbearingTo(Location dest)Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. -
-
Constructor Detail
-
LocationCompute
LocationCompute(Location loc)
-
-
Method Detail
-
distanceTo
final Float distanceTo(Location dest)
Returns the approximate distance in meters between this location and the given location. Distance is defined using the WGS84 ellipsoid.
- Parameters:
dest- the destination location
-
bearingTo
final Float bearingTo(Location dest)
Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. The shortest path is defined using the WGS84 ellipsoid. Locations that are (nearly) antipodal may produce meaningless results.
- Parameters:
dest- the destination location
-
-
-
-