Class EarthLocation

  • Direct Known Subclasses:
    Station

    @Immutable
    public class EarthLocation
    extends Object
    A location on the earth, specified by lat, lon and optionally altitude.
    • Method Detail

      • create

        public static EarthLocation create​(double lat,
                                           double lon,
                                           double alt)
        Create an EarthLocation.
        Parameters:
        lat - latitude in decimal degrees north.
        lon - longitude in decimal degrees north.
        alt - altitude in meters above the reference surface.
      • create

        public static EarthLocation create​(double lat,
                                           double lon,
                                           double alt,
                                           String altUnits)
        Create an EarthLocation.
        Parameters:
        lat - latitude in decimal degrees north.
        lon - longitude in decimal degrees north.
        alt - altitude in meters above the reference surface.
        altUnits - units of the altitude.
      • getLatitude

        public double getLatitude()
        The latitude in decimal degrees north.
      • getLongitude

        public double getLongitude()
        The longitude in decimal degrees east.
      • getAltitude

        public double getAltitude()
        Returns the altitude in some unit. A value of Double.NaN indicates "no altitude".
      • getAltitudeUnits

        @Nullable
        public String getAltitudeUnits()
        Returns the units of the altitude. A null value means "no altitude".
      • getLatLon

        public LatLonPoint getLatLon()
        Get the lat/lon as a LatLonPoint.
      • isMissing

        public boolean isMissing()
        Are either lat or lon missing?
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object