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 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;
      }