コード例 #1
0
      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;
      }
コード例 #2
0
      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();
      }
コード例 #3
0
 public PointFeature next() throws IOException {
   npts++;
   return pfIter.next();
 }