Module org.apache.jena.geosparql
Class GreatCirclePointDistance
java.lang.Object
org.apache.jena.geosparql.implementation.great_circle.GreatCirclePointDistance
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.
Constant values are calculated once to avoid repetition.
Latitude and longitude calculated in stages to avoid unnecessary calculations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
double
double
double
double
double
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).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).double
double
double
double
double
latitude
(double bearingRad) double
longitude
(double endLatRad, double bearingRad) static double
normaliseLongitude
(double lonDegrees) Normalise Longitude in degrees to the range -180 to 180.static final LatLonPoint
radToPoint
(double latRad, double lonRad) Convert Lat/Lon in radians to Point in degrees.
Longitude normalised between -180 and 180.static final LatLonPoint
radToPoint
(double latRad, double lonRad, boolean isNormaliseLon) Convert Lat/Lon in radians to Point in degrees.toString()
-
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
-
latitude
public double latitude(double bearingRad) -
longitude
public double longitude(double endLatRad, double bearingRad) -
radToPoint
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
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
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.
-