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 TypeMethodDescriptionvoid
Adds a point to the airspace boundary.cacheKey()
Returns the cache key for this object.int
Compares two Airspaces by comparing their types and IDs.boolean
contains
(GeospaceLocation loc) Returns whether a point is contained within this Airspace.boolean
static Collection
<Airspace> findRestricted
(GeoLocation loc, int distance) Returns whether any restricted airspace is within a set distance of a point.int
Returns 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.double
Returns the latitude of this location.double
Returns the longitude of this location.int
Returns the maximum altitude of this airspace.int
Returns the minimum altitude of this airspace.getName()
Returns the Airspace name.getType()
Returns the Airspace type.int
hashCode()
static void
init
(Collection<Airspace> data) Initializes restricted airspace.boolean
Returns whether this is an exclusion zone of an existing Airspace.static Airspace
Returns whether a particular point is in restricted airspace.void
setBorder
(Collection<GeoLocation> locs) Sets the airspace boundary.void
Sets the nation containing this Airspace.void
setExclusion
(boolean isExclusion) Sets whether this is an exclusion zone of an existing Airspace.void
setMaxAltitude
(int alt) Sets the maximum altitude of the Airspace.void
setMinAltitude
(int alt) Sets the minimum altitude of the Airspace.void
Sets the Airspace name.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:GeoLocation
Returns the latitude of this location.- Specified by:
getLatitude
in interfaceGeoLocation
- Returns:
- the latitude in degrees
-
getLongitude
public double getLongitude()Description copied from interface:GeoLocation
Returns the longitude of this location.- Specified by:
getLongitude
in interfaceGeoLocation
- Returns:
- the longitude in degrees
-
getAltitude
public int getAltitude()Description copied from interface:GeospaceLocation
Returns the altitude of the location above MSL.- Specified by:
getAltitude
in 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:MapEntry
Returns the text to display in this marker's infobox if displayed in a Google Map.- Specified by:
getInfoBox
in interfaceMapEntry
- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-
cacheKey
-
equals
-
hashCode
-
toString
-