Package com.luciad.format.asterix
Class TLcdASTERIXAltitudeRecordFilter
java.lang.Object
com.luciad.format.asterix.TLcdASTERIXAltitudeRecordFilter
- All Implemented Interfaces:
ILcdASTERIXRecordFilter
Implementation of ILcdASTERIXRecordFilter
that can filter out records below a specified minimum altitude
or above a certain maximum altitude.
The range of the filter is inclusive. This means that records with an altitude exactly equal to the minimum or maximum height are still accepted.
This filter accepts all records whose instances are not an ILcdPoint
, like weather records.
- Since:
- 2013.0.14
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new altitude filter with the default settings.TLcdASTERIXAltitudeRecordFilter
(double aMinimumAltitude, double aMaximumAltitude) Creates a new record filter that rejects records whose altitude is less than the specified minimum altitude or greater than the specified maximum altitude. -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(ILcdDataObject aASTERIXRecord) Decide whether an ASTERIX record should be processed or ignored.double
Returns the maximum altitude in meters.double
Returns the minimum altitude in meters.void
setMaximumAltitude
(double aMaximumAltitude) Sets the maximum accepted altitude by this filter in meters.void
setMinimumAltitude
(double aMinimumAltitude) Sets the minimum accepted altitude by this filter in meters.
-
Constructor Details
-
TLcdASTERIXAltitudeRecordFilter
public TLcdASTERIXAltitudeRecordFilter()Creates a new altitude filter with the default settings. The default minimum altitude isDouble.NEGATIVE_INFINITY
. The default maximum altitude isDouble.POSITIVE_INFINITY
. This means that, with the default settings, all records are accepted. -
TLcdASTERIXAltitudeRecordFilter
public TLcdASTERIXAltitudeRecordFilter(double aMinimumAltitude, double aMaximumAltitude) Creates a new record filter that rejects records whose altitude is less than the specified minimum altitude or greater than the specified maximum altitude.- Parameters:
aMinimumAltitude
- The minimum altitude in meters.aMaximumAltitude
- The maximum altitude in meters.- See Also:
-
-
Method Details
-
accept
Description copied from interface:ILcdASTERIXRecordFilter
Decide whether an ASTERIX record should be processed or ignored.
- Specified by:
accept
in interfaceILcdASTERIXRecordFilter
- Parameters:
aASTERIXRecord
- TheILcdDataObject
that represents the ASTERIX record. Its type corresponds to one of the UAP types in theTLcdASTERIXDataTypes
class. No references should be kept to this object after this method has returned, as the same object might be reused in subsequent calls.- Returns:
true
to process the record,false
to ignore it.
-
setMinimumAltitude
public void setMinimumAltitude(double aMinimumAltitude) Sets the minimum accepted altitude by this filter in meters. Any ASTERIX record containing information about a location lower than this altitude is rejected. The default value isDoule.NEGATIVE_INFINITY
.- Parameters:
aMinimumAltitude
- The minimum altitude, in meters.
-
getMinimumAltitude
public double getMinimumAltitude()Returns the minimum altitude in meters.- Returns:
- The minimum altitude in meters. By default this is
Double.NEGATIVE_INFINITY
. - See Also:
-
setMaximumAltitude
public void setMaximumAltitude(double aMaximumAltitude) Sets the maximum accepted altitude by this filter in meters. Any ASTERIX record containing information about a location higher than this altitude is rejected. The default value isDoule.POSITIVE_INFINITY
.- Parameters:
aMaximumAltitude
- The maximum altitude, in meters.
-
getMaximumAltitude
public double getMaximumAltitude()Returns the maximum altitude in meters.- Returns:
- The maximum altitude in meters. By default this is
Double.POSITIVE_INFINITY
. - See Also:
-