Class AirportLocation
java.lang.Object
org.deltava.beans.navdata.NavigationDataBean
org.deltava.beans.navdata.AirportLocation
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<NavigationDataBean>, GeoLocation, GeospaceLocation, IconMapEntry, LabelMapEntry, MapEntry, MarkerMapEntry, ICAOAirport, Cacheable
A class to store airport location data.
- Since:
- 1.0
- Version:
- 6.4
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from interface GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILESModifier 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.Fields inherited from interface MapEntry
BLUE, BROWN, COLORS, GREEN, GREY, ORANGE, PURPLE, RED, WHITE, YELLOWModifier and TypeFieldDescriptionstatic final StringBlue Google Maps icon, displayed as $static/img/maps/point_blue.pngstatic final StringBrown Google Maps icon, displayed as $static/img/maps/point_brown.pngstatic final String[]All Google Maps icon colors.static final StringGreen Google Maps icon, displayed as $static/img/maps/point_green.pngstatic final StringGrey Google Maps icon, displayed as $static/img/maps/point_grey.pngstatic final StringOrange Google Maps icon, displayed as $static/img/maps/point_orange.pngstatic final StringPurple Google Maps icon, displayed as $static/img/maps/point_purple.pngstatic final StringRed Google Maps icon, displayed as $static/img/maps/point_red.pngstatic final StringWhite Google Maps icon, displayed as $static/img/maps/point_white.pngstatic final StringYellow Google Maps icon, displayed as $static/img/maps/point_yellow.png -
Constructor Summary
ConstructorsConstructorDescriptionAirportLocation(double lat, double lon) Creates a new Airport location object.Creates a Airport location from an Airport bean. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the airway code.intReturns the Airport's altitude.getICAO()Returns the Airport's ICAO code.intReturns the Google Earth icon code.Return the default Google Maps icon color.Returns the default Google Maps infobox text.intReturns the Google Earth palette code.voidsetAltitude(int alt) Updates the Airport's altitude.Methods inherited from class NavigationDataBean
cacheKey, clone, compareTo, create, create, equals, getCode, getHTMLPosition, getHTMLTitle, getLabel, getLatitude, getLongitude, getName, getRegion, getType, hashCode, isCoordinates, isInTerminalRoute, setAirway, setCode, setName, setRegion, toStringModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.clone()intCompares two objects by comparing their codes.static NavigationDataBeanCreats a bean from a unique ID that matches the ACARS dispatch client.static NavigationDataBeanCreates a bean from a type, latitude and longitude.booleangetCode()Returns the object's code.protected StringHelper method to return the Latitude/Longitude for HTML infoboxes.protected StringHelper method to return the item type and code for HTML infoboxes.getLabel()Returns the label text.final doubleReturns the latitude of this location.final doubleReturns the longitude of this location.getName()Returns the object's name.final StringReturns the ICAO region code for this entry.final NavaidgetType()Returns the object's type.inthashCode()static CodeTypeisCoordinates(String code) Returns whether a waypoint code is actually encoded coordinates.booleanReturns whether this waypoint is part of a terminal route.voidUpdates if this entry is on an airway.voidUpdates the object's code.voidUpdates the object's name.voidUpdates the ICAO region code for this entry.toString()Returns this navigation aid's unique ID in a format that matches the ACARS dispatch client.Methods inherited from interface GeoLocation
distanceFeet, distanceToModifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.
-
Constructor Details
-
AirportLocation
public AirportLocation(double lat, double lon) Creates a new Airport location object.- Parameters:
lat- the latitude in degreeslon- the longitude in degrees
-
AirportLocation
Creates a Airport location from an Airport bean.- Parameters:
a- the Airport bean
-
-
Method Details
-
getICAO
Returns the Airport's ICAO code.- Specified by:
getICAOin interfaceICAOAirport- Returns:
- the ICAO code
-
getAltitude
public int getAltitude()Returns the Airport's altitude.- Specified by:
getAltitudein interfaceGeospaceLocation- Returns:
- the altitude in feet above mean sea level
-
setAltitude
public void setAltitude(int alt) Updates the Airport's altitude.- Parameters:
alt- the altitude in feet above mean sea level- Throws:
IllegalArgumentException- if alt invalid input: '<' -1500 or > 29000
-
getAirway
Returns the airway code.- Overrides:
getAirwayin classNavigationDataBean- Returns:
- the airway code
-
getIconColor
Return the default Google Maps icon color.- Specified by:
getIconColorin interfaceMarkerMapEntry- Returns:
- MapEntry.GREEN
-
getPaletteCode
public int getPaletteCode()Returns the Google Earth palette code.- Specified by:
getPaletteCodein interfaceIconMapEntry- Returns:
- 2
-
getIconCode
public int getIconCode()Returns the Google Earth icon code.- Specified by:
getIconCodein interfaceIconMapEntry- Returns:
- 48
-
getInfoBox
Returns the default Google Maps infobox text.- Specified by:
getInfoBoxin interfaceMapEntry- Returns:
- an HTML String
-