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 protectedLatLong(double latitude, double longitude)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()doublelatitude()The north-south position of a point on earth.doublelongitude()The east-west position of a point on earth.static LatLongof(double latitude, double longitude)StringtoISO6709()Format toStringusing ISO 6709.StringtoString()
-
-
-
Method Detail
-
of
public static LatLong of(double latitude, double longitude)
Create a new geographical point with givenlatitudeandlongitude.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 toStringusing 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
-
-