Package noaa.coastwatch.util
Class ExpressionFilter
java.lang.Object
noaa.coastwatch.util.ExpressionFilter
- All Implemented Interfaces:
LocationFilter
The
ExpressionFilter
class detects locations
whose data variable values satisfy a mathematical expression. If the
expression evaluates to true at the given location, the filter returns
true, otherwise it returns false.- Since:
- 3.3.2
- Author:
- Peter Hollemans
- See Also:
-
Constructor Summary
ConstructorDescriptionExpressionFilter
(EarthDataReader reader, String expression) Creates a new filter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
useLocation
(DataLocation loc) Determines if a data location should be used in the context of some computation.
-
Constructor Details
-
ExpressionFilter
Creates a new filter.- Parameters:
reader
- the reader to use for data variables.expression
- the mask expression. Variables names in the expression must have corresponding grids in the reader.
-
-
Method Details
-
useLocation
Description copied from interface:LocationFilter
Determines if a data location should be used in the context of some computation.- Specified by:
useLocation
in interfaceLocationFilter
- Parameters:
loc
- the location to determine for use.- Returns:
- true if the location should be used, or false if not.
-