private PointFeature nextFilteredDataPoint() throws IOException {
    if (orgIter == null) return null;
    if (!orgIter.hasNext()) return null;

    PointFeature pdata = orgIter.next();
    while (!filter(pdata)) {
      if (!orgIter.hasNext()) return null;
      pdata = orgIter.next();
    }

    return pdata;
  }
      public boolean hasNext() throws IOException {
        if (pfIter == null) {
          pfIter = getNextIterator();
          if (pfIter == null) {
            finish();
            return false;
          }
        }

        if (!pfIter.hasNext()) {
          pfIter.finish();
          currentDataset.close();
          if (CompositeDatasetFactory.debug)
            System.out.printf(
                "CompositeStationFeatureIterator close dataset: %s%n",
                currentDataset.getLocation());
          pfIter = getNextIterator();
          return hasNext();
        }

        return true;
      }
      public void finish() {
        if (finished) return;

        if (pfIter != null) pfIter.finish();

        if (currentDataset != null)
          try {
            currentDataset.close();
            if (CompositeDatasetFactory.debug)
              System.out.printf(
                  "CompositeStationFeatureIterator close dataset: %s%n",
                  currentDataset.getLocation());
          } catch (IOException e) {
            throw new RuntimeException(e);
          }

        finishCalcBounds();
        finished = true;
        // if (CompositeStationFeature.this.npts < 0) // LOOK needed ?
        //  CompositeStationFeature.this.npts = getCount();
      }
 public void finish() {
   if (finished) return;
   orgIter.finish();
   finishCalcBounds();
   finished = true;
 }
 public void setBufferSize(int bytes) {
   orgIter.setBufferSize(bytes);
 }
 public PointFeature next() throws IOException {
   npts++;
   return pfIter.next();
 }