@Override public boolean hasNext() { try { while (true) { StructureData sdata = nextStructureData(); if (sdata == null) break; feature = makeFeature(structIter.getCurrentRecno(), sdata); if (feature == null) continue; if (feature.getLocation().isMissing()) { continue; } if (filter == null || filter.filter(feature)) return true; } // all done feature = null; close(); return false; } catch (IOException ioe) { throw new RuntimeException(ioe); } }
public static boolean equals(EarthLocation loc1, EarthLocation loc2) { if (loc1 == loc2) { return true; } else if (loc1 == null || loc2 == null) { return false; } if (!loc1.getLatLon().nearlyEquals(loc2.getLatLon(), 1.0e-8)) { return false; } else if (!Misc.nearlyEquals(loc1.getAltitude(), loc2.getAltitude(), 1.0e-8)) { return false; } else if (!Objects.deepEquals(loc1.isMissing(), loc2.isMissing())) { return false; } return true; }
public boolean hasNext() throws IOException { while (true) { StructureData sdata = nextStructureData(); if (sdata == null) break; feature = makeFeature(structIter.getCurrentRecno(), sdata); if (feature == null) continue; if (feature.getLocation().isMissing()) { continue; } if (filter == null || filter.filter(feature)) return true; } // all done feature = null; finish(); return false; }
public boolean hasNext() throws IOException { while (true) { StructureData sdata = nextStructureData(); if (sdata == null) break; feature = makeFeature(structIter.getCurrentRecno(), sdata); if (feature == null) continue; if (feature.getLocation().isMissing()) { continue; } if (filter == null || filter.filter(feature)) return true; } // all done feature = null; finish(); return false; }