Class Airspace
java.lang.Object
org.deltava.beans.navdata.Airspace
- All Implemented Interfaces:
Serializable,Comparable<Airspace>,GeoLocation,GeospaceLocation,MapEntry,Cacheable
- Direct Known Subclasses:
FIR
public class Airspace
extends Object
implements MapEntry, GeospaceLocation, Comparable<Airspace>, Cacheable
A bean to define arbitrary airspace boundaries.
- Since:
- 7.3
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a point to the airspace boundary.cacheKey()Returns the cache key for this object.intCompares two Airspaces by comparing their types and IDs.booleancontains(GeospaceLocation loc) Returns whether a point is contained within this Airspace.booleanstatic Collection<Airspace> findRestricted(GeoLocation loc, int distance) Returns whether any restricted airspace is within a set distance of a point.intReturns the altitude of the location above MSL.Returns the coordinates of the FIR boundary.Returns the nation containing this Airspace.getID()Returns the Airspace ID.Returns the text to display in this marker's infobox if displayed in a Google Map.doubleReturns the latitude of this location.doubleReturns the longitude of this location.intReturns the maximum altitude of this airspace.intReturns the minimum altitude of this airspace.getName()Returns the Airspace name.getType()Returns the Airspace type.inthashCode()static voidinit(Collection<Airspace> data) Initializes restricted airspace.booleanReturns whether this is an exclusion zone of an existing Airspace.static AirspaceReturns whether a particular point is in restricted airspace.voidsetBorder(Collection<GeoLocation> locs) Sets the airspace boundary.voidSets the nation containing this Airspace.voidsetExclusion(boolean isExclusion) Sets whether this is an exclusion zone of an existing Airspace.voidsetMaxAltitude(int alt) Sets the maximum altitude of the Airspace.voidsetMinAltitude(int alt) Sets the minimum altitude of the Airspace.voidSets the Airspace name.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceTo
-
Constructor Details
-
Method Details
-
init
Initializes restricted airspace.- Parameters:
data- a Collection of Airspace beans
-
isRestricted
Returns whether a particular point is in restricted airspace.- Parameters:
loc- the GeospaceLocation- Returns:
- the Airspace bean, or null if none
-
findRestricted
Returns whether any restricted airspace is within a set distance of a point.- Parameters:
loc- the GeoLocationdistance- the distance in miles- Returns:
- a Collection of Airspace beans
-
getName
-
getID
-
getType
-
getBorder
Returns the coordinates of the FIR boundary.- Returns:
- a Collection of GeoLocations
- See Also:
-
getCountry
Returns the nation containing this Airspace.- Returns:
- a Country, or null if unknown
-
getMaxAltitude
public int getMaxAltitude()Returns the maximum altitude of this airspace.- Returns:
- the altitude in feet MSL
-
getMinAltitude
public int getMinAltitude()Returns the minimum altitude of this airspace.- Returns:
- the altitude in feet MSL
-
getLatitude
public double getLatitude()Description copied from interface:GeoLocationReturns the latitude of this location.- Specified by:
getLatitudein interfaceGeoLocation- Returns:
- the latitude in degrees
-
getLongitude
public double getLongitude()Description copied from interface:GeoLocationReturns the longitude of this location.- Specified by:
getLongitudein interfaceGeoLocation- Returns:
- the longitude in degrees
-
getAltitude
public int getAltitude()Description copied from interface:GeospaceLocationReturns the altitude of the location above MSL.- Specified by:
getAltitudein interfaceGeospaceLocation- Returns:
- the altitude in feet
-
contains
Returns whether a point is contained within this Airspace.- Parameters:
loc- a GeospaceLocation- Returns:
- TRUE if the Airspace contains this point, otherwise FALSE
-
isExclusion
public boolean isExclusion()Returns whether this is an exclusion zone of an existing Airspace.- Returns:
- TRUE if an exclusion zone, otherwise FALSE
-
addBorderPoint
Adds a point to the airspace boundary.- Parameters:
loc- a GeoLocation- See Also:
-
setBorder
Sets the airspace boundary.- Parameters:
locs- a Collection of GeoLocations- See Also:
-
setName
Sets the Airspace name.- Parameters:
name- the name- Throws:
NullPointerException- if name is null- See Also:
-
setExclusion
public void setExclusion(boolean isExclusion) Sets whether this is an exclusion zone of an existing Airspace.- Parameters:
isExclusion- TRUE if an exclusion zone, otherwise FALSE
-
setCountry
Sets the nation containing this Airspace.- Parameters:
c- a Country, or null
-
setMaxAltitude
public void setMaxAltitude(int alt) Sets the maximum altitude of the Airspace.- Parameters:
alt- the altitude in feet MSL
-
setMinAltitude
public void setMinAltitude(int alt) Sets the minimum altitude of the Airspace.- Parameters:
alt- the altitude in feet MSL
-
getInfoBox
Description copied from interface:MapEntryReturns the text to display in this marker's infobox if displayed in a Google Map.- Specified by:
getInfoBoxin interfaceMapEntry- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-
cacheKey
-
equals
-
hashCode
-
toString
-