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 Details

    • LatLong

      protected LatLong(double latitude, double longitude)
  • Method Details

    • of

      public static LatLong of(double latitude, double longitude)
      Create a new geographical point with given latitude and longitude.

      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 latitude
      longitude - 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 to String using ISO 6709. The output is in 5 decimals. The decimal degree precision is 1.1132m at the equator
      Returns:
      notation according to ISO 6709
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object