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 TypeMethodDescriptionbooleanaccept(ILcdDataObject aASTERIXRecord) Decide whether an ASTERIX record should be processed or ignored.doubleReturns the maximum altitude in meters.doubleReturns the minimum altitude in meters.voidsetMaximumAltitude(double aMaximumAltitude) Sets the maximum accepted altitude by this filter in meters.voidsetMinimumAltitude(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:ILcdASTERIXRecordFilterDecide whether an ASTERIX record should be processed or ignored.
- Specified by:
acceptin interfaceILcdASTERIXRecordFilter- Parameters:
aASTERIXRecord- TheILcdDataObjectthat represents the ASTERIX record. Its type corresponds to one of the UAP types in theTLcdASTERIXDataTypesclass. No references should be kept to this object after this method has returned, as the same object might be reused in subsequent calls.- Returns:
trueto process the record,falseto 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:
-