예제 #1
0
  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;
      }