Interface GeoLocation

All Known Subinterfaces:
GeospaceLocation, ICAOAirport, IconMapEntry, MapEntry, MarkerMapEntry, TabbedMapEntry
All Known Implementing Classes:
AbstractRoute, ACARSMapEntry, ACARSRouteEntry, Airport, AirportLocation, Airspace, Airway, ATCMapEntry, ConnectedUser, Controller, Cyclone, DispatchMapEntry, FIR, FuzzyPosition, Gate, GeocodeResult, GeoPosition, GetFlightReportStatistics.DispatchScheduleRoute, GRIBResult, GroundMapEntry, ImportRoute, Intersection, IPBlock, MapRouteEntry, METAR, NavigationDataBean, NavigationFrequencyBean, NDB, OceanicTrack, Pilot, PilotLocation, PositionData, RadioPosition, RouteEntry, RouteStats, Runway, RunwayDistance, RunwayThreshold, RunwayUse, ScheduleRoute, SelectableGate, TAF, TerminalRoute, TrackUpdate, VOR, WeatherDataBean, WindData, XARouteEntry

public interface GeoLocation
An interface to mark objects that contain a latitude/longitude pair.
Since:
1.0
Version:
10.3
Author:
Luke
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Format the Longitude and Latitude.
    static final double
    Size of a degree in feet.
    static final double
    Size of a degree in miles.
    static final int
    Size of a mile in feet.
    static final String[]
    Latitude directions.
    static final int
    Format the Latitude only.
    static final String[]
    Longitude directions.
    static final int
    Format the Longitude only.
    static final int
    Radius of the Earth in miles.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Calculates the distance between two points in feet.
    default int
    Calculates the distance between two GeoLocations.
    double
    Returns the latitude of this location.
    double
    Returns the longitude of this location.
  • Field Details

  • Method Details

    • getLatitude

      double getLatitude()
      Returns the latitude of this location.
      Returns:
      the latitude in degrees
    • getLongitude

      double getLongitude()
      Returns the longitude of this location.
      Returns:
      the longitude in degrees
    • distanceTo

      default int distanceTo(GeoLocation l2)
      Calculates the distance between two GeoLocations.
      Parameters:
      l2 - the other GeoLocation
      Returns:
      The distance in statute miles between the two positions, or -1 if gp2 is null
    • distanceFeet

      default int distanceFeet(GeoLocation l2)
      Calculates the distance between two points in feet.
      Parameters:
      l2 - the second GeoLocation
      Returns:
      the distance in feet, or -1 if l1 or l2 are null
      See Also: