private boolean filterTinv( Grib2Record gr, FeatureCollectionConfig.GribIntvFilter intvFilter, Formatter f) { int[] intv = tables.getForecastTimeIntervalOffset(gr); if (intv == null) return false; int haveLength = intv[1] - intv[0]; // HACK if (haveLength == 0 && intvFilter.isZeroExcluded()) { // discard 0,0 if ((intv[0] == 0) && (intv[1] == 0)) { f.format(" FILTER INTV [0, 0] %s%n", gr); return true; } return false; } else if (intvFilter.hasMap()) { int discipline = gr.getIs().getDiscipline(); int category = gr.getPDS().getParameterCategory(); int number = gr.getPDS().getParameterNumber(); int id = (discipline << 16) + (category << 8) + number; Integer needLength = intvFilter.getLengthById(id); if (needLength != null && needLength != haveLength) { f.format(" FILTER INTV [%d != %d] %s%n", haveLength, needLength, gr); return true; } } return false; }