public void finish() { if (finished) return; if (pfIter != null) pfIter.finish(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); } catch (IOException e) { throw new RuntimeException(e); } finished = true; }
public void finish() { if (finished) return; if (pfIter != null) pfIter.finish(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); } catch (IOException e) { throw new RuntimeException(e); } finished = true; }
public void finish() { if (finished) return; if (pfIter != null) pfIter.finish(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); } catch (IOException e) { throw new RuntimeException(e); } finished = true; }
public void finish() { if (finished) return; if (pfIter != null) pfIter.finish(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); } catch (IOException e) { throw new RuntimeException(e); } finished = true; }
@Override public void close() { if (finished) return; if (pfIter != null) pfIter.close(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); } catch (IOException e) { throw new RuntimeException(e); } finished = true; } }
public void finish() { if (finished) return; if (pfIter != null) pfIter.finish(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); if (CompositeDatasetFactory.debug) System.out.printf("CompositeStationCollectionFlattened close dataset: %s%n", currentDataset.getLocation()); } catch (IOException e) { throw new RuntimeException(e); } finished = true; }
public void finish() { if (finished) return; if (pfIter != null) pfIter.finish(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); if (CompositeDatasetFactory.debug) System.out.printf("CompositeStationCollectionFlattened close dataset: %s%n", currentDataset.getLocation()); } catch (IOException e) { throw new RuntimeException(e); } finished = true; }
@Override public void close() { if (finished) return; if (pfIter != null) pfIter.close(); 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; } }
@Override public void close() { if (finished) return; if (pfIter != null) pfIter.close(); finishCalcBounds(); if (currentDataset != null) try { currentDataset.close(); if (CompositeDatasetFactory.debug) System.out.printf("CompositeStationCollectionFlattened close dataset: %s%n", currentDataset.getLocation()); } catch (IOException e) { throw new RuntimeException(e); } finished = 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; 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("CompositeStationCollectionFlattened.Iterator close dataset: %s%n", currentDataset.getLocation()); pfIter = getNextIterator(); return hasNext(); } return true; }
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 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("CompositeStationCollectionFlattened.Iterator close dataset: %s%n", currentDataset.getLocation()); pfIter = getNextIterator(); return hasNext(); } return true; }
public boolean hasNext() throws IOException { if (pfIter == null) { pfIter = getNextIterator(); if (pfIter == null) { finish(); return false; } } if (!pfIter.hasNext()) { pfIter.finish(); if (CompositeDatasetFactory.debug) System.out.printf("CompositePointFeatureIterator open dataset %s%n", currentDataset.getLocation()); currentDataset.close(); pfIter = getNextIterator(); return hasNext(); } return true; }
public boolean hasNext() throws IOException { if (pfIter == null) { pfIter = getNextIterator(); if (pfIter == null) { finish(); return false; } } if (!pfIter.hasNext()) { pfIter.finish(); if (CompositeDatasetFactory.debug) System.out.printf("CompositePointFeatureIterator open dataset %s%n", currentDataset.getLocation()); currentDataset.close(); pfIter = getNextIterator(); return hasNext(); } return true; }
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 boolean hasNext() throws IOException { if (pfIter == null) { pfIter = getNextIterator(); if (pfIter == null) { finish(); return false; } } if (!pfIter.hasNext()) { pfIter.finish(); currentDataset.close(); pfIter = getNextIterator(); return hasNext(); } return true; }
public boolean hasNext() throws IOException { if (pfIter == null) { pfIter = getNextIterator(); if (pfIter == null) { finish(); return false; } } if (!pfIter.hasNext()) { pfIter.finish(); currentDataset.close(); pfIter = getNextIterator(); return hasNext(); } return true; }
@Test public void testAltUnits() throws Exception { // Ignore this test if NetCDF-4 isn't present. Assume.assumeTrue("NetCDF-4 C library not present.", Nc4Iosp.isClibraryPresent()); String file = TestDir.cdmLocalTestDataDir + "point/stationRaggedContig.ncml"; Formatter buf = new Formatter(); try (FeatureDatasetPoint pods = (FeatureDatasetPoint) FeatureDatasetFactoryManager.open(ucar.nc2.constants.FeatureType.STATION, file, null, buf)) { List<DsgFeatureCollection> collectionList = pods.getPointFeatureCollectionList(); assert (collectionList.size() == 1) : "Can't handle point data with multiple collections"; DsgFeatureCollection fc1 = collectionList.get(0); assert fc1.getAltUnits() != null : "no Alt Units"; assert fc1.getAltUnits().equalsIgnoreCase("m") : "Alt Units should be 'm'"; FeatureDatasetPoint rewrite = rewriteDataset(pods, "nc4", new CFPointWriterConfig(NetcdfFileWriter.Version.netcdf4)); collectionList = rewrite.getPointFeatureCollectionList(); DsgFeatureCollection fc2 = collectionList.get(0); assert fc2 instanceof PointFeatureCC; assert fc2.getAltUnits() != null : "no Alt Units"; assert fc2.getAltUnits().equalsIgnoreCase("m") : "Alt Units should be 'm'"; rewrite.close(); } }