Class ExpressionFilter

java.lang.Object
noaa.coastwatch.util.ExpressionFilter
All Implemented Interfaces:
LocationFilter

public class ExpressionFilter extends Object implements 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 Details

    • ExpressionFilter

      public ExpressionFilter(EarthDataReader reader, String expression)
      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

      public boolean useLocation(DataLocation loc)
      Description copied from interface: LocationFilter
      Determines if a data location should be used in the context of some computation.
      Specified by:
      useLocation in interface LocationFilter
      Parameters:
      loc - the location to determine for use.
      Returns:
      true if the location should be used, or false if not.