Interface GeoLocation
- All Known Subinterfaces:
GeospaceLocation, ICAOAirport, IconMapEntry, LabelMapEntry, 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
FieldsModifier and TypeFieldDescriptionstatic final intFormat the Longitude and Latitude.static final doubleSize of a degree in feet.static final doubleSize of a degree in miles.static final intSize of a mile in feet.static final String[]Latitude directions.static final intFormat the Latitude only.static final String[]Longitude directions.static final intFormat the Longitude only.static final intRadius of the Earth in miles. -
Method Summary
Modifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.doubleReturns the latitude of this location.doubleReturns the longitude of this location.
-
Field Details
-
DEGREE_MILES
static final double DEGREE_MILESSize of a degree in miles.- See Also:
-
DEGREE_FEET
static final double DEGREE_FEETSize of a degree in feet.- See Also:
-
FEET_MILES
static final int FEET_MILESSize of a mile in feet.- See Also:
-
RADIAN_MILES
static final int RADIAN_MILESRadius of the Earth in miles.- See Also:
-
LATITUDE
static final int LATITUDEFormat the Latitude only.- See Also:
-
LONGITUDE
static final int LONGITUDEFormat the Longitude only.- See Also:
-
ALL
static final int ALLFormat the Longitude and Latitude.- See Also:
-
LAT_DIRECTIONS
Latitude directions. -
LON_DIRECTIONS
Longitude directions.
-
-
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
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
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:
-