Package org.esa.snap.core.util.math
Class SphericalDistance
java.lang.Object
org.esa.snap.core.util.math.SphericalDistance
- All Implemented Interfaces:
DistanceMeasure
This class computes the spherical distance (in Radian) between two (lon, lat) points.
-
Constructor Summary
ConstructorsConstructorDescriptionSphericalDistance(double lon, double lat) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance(double lon, double lat) Returns the spherical distance (in Radian) of a given (lon, lat) point to the reference (lon, lat) point.
-
Constructor Details
-
SphericalDistance
public SphericalDistance(double lon, double lat) Creates a new instance of this class.- Parameters:
lon- The reference longitude of this distance calculator.lat- The reference latitude of this distance calculator.
-
-
Method Details
-
distance
public double distance(double lon, double lat) Returns the spherical distance (in Radian) of a given (lon, lat) point to the reference (lon, lat) point.- Specified by:
distancein interfaceDistanceMeasure- Parameters:
lon- The longitude.lat- The latitude.- Returns:
- the spherical distance (in Radian) of the given (lon, lat) point to the reference (lon, lat) point.
-