Class LatLong
- java.lang.Object
-
- org.hansken.plugin.extraction.api.LatLong
-
public class LatLong extends Object
A geographical location consisting of a latitude and a longitude.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LatLong(double latitude, double longitude)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
double
latitude()
The north-south position of a point on earth.double
longitude()
The east-west position of a point on earth.static LatLong
of(double latitude, double longitude)
String
toISO6709()
Format toString
using ISO 6709.String
toString()
-
-
-
Method Detail
-
of
public static LatLong of(double latitude, double longitude)
Create a new geographical point with givenlatitude
andlongitude
.Note: this does not do any input validation. Valid values should be between -90 and +90 inclusive for latitude and between -180 and +180 inclusive for longitude.
- Parameters:
latitude
- the latitudelongitude
- the longitude- Returns:
- the new point
-
latitude
public double latitude()
The north-south position of a point on earth.- Returns:
- the latitude
-
longitude
public double longitude()
The east-west position of a point on earth.- Returns:
- the longitude
-
toISO6709
public String toISO6709()
Format toString
using ISO 6709. The output is in in 5 decimals. The decimal degree precision is 1.1132m at the equator- Returns:
- notation according to ISO 6709
-
-