Package org.sm.smtools.math
Class LongLatPosition
java.lang.Object
org.sm.smtools.math.LongLatPosition
The
LongLatPosition
class provides a data container for a (longitude,latitude) position.
Note that this class cannot be subclassed!
- Version:
- 06/07/2022
- Author:
- Sven Maerivoet
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aLongLatPosition
object with zero-coordinates.LongLatPosition
(double longitude, double latitude) Constructs aLongLatPosition
object with the specified (longitude,latitude) coordinates. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the position's latitude.double
Gets the position's longitude.void
setLatitude
(double latitude) Sets the position's latitude.void
setLongitude
(double longitude) Sets the position's longitude.
-
Constructor Details
-
LongLatPosition
public LongLatPosition(double longitude, double latitude) Constructs aLongLatPosition
object with the specified (longitude,latitude) coordinates.- Parameters:
longitude
- -latitude
- -
-
LongLatPosition
public LongLatPosition()Constructs aLongLatPosition
object with zero-coordinates.
-
-
Method Details
-
getLongitude
public double getLongitude()Gets the position's longitude.- Returns:
- the position's longitude
-
setLongitude
public void setLongitude(double longitude) Sets the position's longitude.- Parameters:
longitude
- -
-
getLatitude
public double getLatitude()Gets the position's latitude.- Returns:
- the position's latitude
-
setLatitude
public void setLatitude(double latitude) Sets the position's latitude.- Parameters:
latitude
- -
-